added parent ids to changeset

This commit is contained in:
Sebastian Sdorra
2011-12-31 17:53:03 +01:00
parent b8fe0ce270
commit 6060fc8c8d

View File

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