Merge "Allow to tag reviews"
This commit is contained in:
@@ -74,6 +74,10 @@ public final class ChangeMessage {
|
||||
@Column(id = 5, notNull = false)
|
||||
protected PatchSet.Id patchset;
|
||||
|
||||
/** Tag associated with change message */
|
||||
@Column(id = 6, notNull = false)
|
||||
protected String tag;
|
||||
|
||||
protected ChangeMessage() {
|
||||
}
|
||||
|
||||
@@ -117,6 +121,14 @@ public final class ChangeMessage {
|
||||
message = s;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public PatchSet.Id getPatchSetId() {
|
||||
return patchset;
|
||||
}
|
||||
@@ -132,6 +144,7 @@ public final class ChangeMessage {
|
||||
+ ", author=" + author
|
||||
+ ", writtenOn=" + writtenOn
|
||||
+ ", patchset=" + patchset
|
||||
+ ", tag=" + tag
|
||||
+ ", message=[" + message
|
||||
+ "]}";
|
||||
}
|
||||
|
||||
@@ -122,6 +122,9 @@ public final class PatchLineComment {
|
||||
@Column(id = 9, notNull = false)
|
||||
protected CommentRange range;
|
||||
|
||||
@Column(id = 10, notNull = false)
|
||||
protected String tag;
|
||||
|
||||
/**
|
||||
* The RevId for the commit to which this comment is referring.
|
||||
*
|
||||
@@ -249,6 +252,14 @@ public final class PatchLineComment {
|
||||
return revId;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o instanceof PatchLineComment) {
|
||||
@@ -262,7 +273,8 @@ public final class PatchLineComment {
|
||||
&& Objects.equals(message, c.getMessage())
|
||||
&& Objects.equals(parentUuid, c.getParentUuid())
|
||||
&& Objects.equals(range, c.getRange())
|
||||
&& Objects.equals(revId, c.getRevId());
|
||||
&& Objects.equals(revId, c.getRevId())
|
||||
&& Objects.equals(tag, c.getTag());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -289,6 +301,7 @@ public final class PatchLineComment {
|
||||
builder.append("range=").append(Objects.toString(range, ""))
|
||||
.append(',');
|
||||
builder.append("revId=").append(revId != null ? revId.get() : "");
|
||||
builder.append("tag=").append(Objects.toString(tag, ""));
|
||||
builder.append('}');
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@@ -90,6 +90,9 @@ public final class PatchSetApproval {
|
||||
@Column(id = 3)
|
||||
protected Timestamp granted;
|
||||
|
||||
@Column(id = 6, notNull = false)
|
||||
protected String tag;
|
||||
|
||||
// DELETED: id = 4 (changeOpen)
|
||||
// DELETED: id = 5 (changeSortKey)
|
||||
|
||||
@@ -145,6 +148,10 @@ public final class PatchSetApproval {
|
||||
}
|
||||
}
|
||||
|
||||
public void setTag(String t) {
|
||||
tag = t;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return getLabelId().get();
|
||||
}
|
||||
@@ -153,10 +160,14 @@ public final class PatchSetApproval {
|
||||
return LabelId.LEGACY_SUBMIT_NAME.equals(getLabel());
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringBuilder().append('[').append(key).append(": ")
|
||||
.append(value).append(']').toString();
|
||||
.append(value).append(",tag:").append(tag).append(']').toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -165,13 +176,14 @@ public final class PatchSetApproval {
|
||||
PatchSetApproval p = (PatchSetApproval) o;
|
||||
return Objects.equals(key, p.key)
|
||||
&& Objects.equals(value, p.value)
|
||||
&& Objects.equals(granted, p.granted);
|
||||
&& Objects.equals(granted, p.granted)
|
||||
&& Objects.equals(tag, p.tag);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(key, value, granted);
|
||||
return Objects.hash(key, value, granted, tag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user