Notedb: Add 'Commit' footer
This makes it possible to map a patch set id to the commit object under review particularly when no inline-comment has been made. Change-Id: I01042c15399f7aa315eb9ab8ae0519cfae608f6a
This commit is contained in:
committed by
Dave Borowitz
parent
6c8e2cbeca
commit
028bc2747a
@@ -88,6 +88,25 @@ public class CommitMessageOutputTest extends AbstractChangeNotesTest {
|
||||
update.getRevision());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void changeWithRevision() throws Exception {
|
||||
Change c = TestChanges.newChange(project, changeOwner.getAccountId(), 1);
|
||||
ChangeUpdate update = newUpdate(c, changeOwner);
|
||||
update.setChangeMessage("Foo");
|
||||
update.setCommit(
|
||||
ObjectId.fromString("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef"));
|
||||
update.commit();
|
||||
assertThat(update.getRefName()).isEqualTo("refs/changes/01/1/meta");
|
||||
|
||||
assertBodyEquals("Update patch set 1\n"
|
||||
+ "\n"
|
||||
+ "Foo\n"
|
||||
+ "\n"
|
||||
+ "Patch-set: 1\n"
|
||||
+ "Commit: deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\n",
|
||||
update.getRevision());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void approvalTombstoneCommitFormat() throws Exception {
|
||||
Change c = newChange();
|
||||
|
||||
Reference in New Issue
Block a user