MergeOp: Record the change set

We want to record a unique identifier which can be queried later to
obtain all changes which were submitted together.

Change-Id: I5ba29aa52c5dc20b37f3b7965a026fd6e84b814b
Signed-off-by: Stefan Beller <sbeller@google.com>
This commit is contained in:
Stefan Beller
2015-09-24 16:24:40 -07:00
parent 341a9d40de
commit 9960d35435
4 changed files with 80 additions and 8 deletions

View File

@@ -453,6 +453,13 @@ public final class Change {
@Column(id = 17, notNull = false)
protected String originalSubject;
/**
* Unique id for the changes submitted together assigned during merging.
* Only set if the status is MERGED.
*/
@Column(id = 18, notNull = false)
protected String submissionId;
protected Change() {
}
@@ -479,6 +486,7 @@ public final class Change {
currentPatchSetId = other.currentPatchSetId;
subject = other.subject;
originalSubject = other.originalSubject;
submissionId = other.submissionId;
topic = other.topic;
}
@@ -562,6 +570,14 @@ public final class Change {
}
}
public String getSubmissionId() {
return submissionId;
}
public void setSubmissionId(String id) {
this.submissionId = id;
}
public Status getStatus() {
return Status.forCode(status);
}