Make error message for rejecting Egit placeholder Change-Id consistent
In the commit dialog Egit uses a placeholder for the Change-Id ("I0000000000000000000000000000000000000000") which it replaces later with the real Change-Id. Some users thought that this placeholder also works on the commandline, but of course there the replacement wasn't done. As result of this there were lots of changes with this placeholder Change-Id (as from the format it's a valid Change-Id) and users got confused about updating each other changes. To prevent this Gerrit rejects this placeholder Change-Id as invalid. However the message for this was inconsistent with the message that is used for other invalid Change-Ids. Also all validations should be done in CommitValidators, but the check for the Egit placeholder Change-Id was still done in ReceiveCommits. Move the check to the right place. Change-Id: I11c3c1a2d0023c4852d2fa6ec3a54a1245030377 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -708,12 +708,14 @@ public abstract class AbstractPushForReview extends AbstractDaemonTest {
|
||||
createCommit(testRepo, "Message with invalid Change-Id\n"
|
||||
+ "\n"
|
||||
+ "Change-Id: I0000000000000000000000000000000000000000\n");
|
||||
pushForReviewRejected(testRepo, "invalid Change-Id");
|
||||
pushForReviewRejected(testRepo,
|
||||
"invalid Change-Id line format in commit message footer");
|
||||
|
||||
ProjectConfig config = projectCache.checkedGet(project).getConfig();
|
||||
config.getProject().setRequireChangeID(InheritableBoolean.FALSE);
|
||||
saveProjectConfig(project, config);
|
||||
pushForReviewRejected(testRepo, "invalid Change-Id");
|
||||
pushForReviewRejected(testRepo,
|
||||
"invalid Change-Id line format in commit message footer");
|
||||
}
|
||||
|
||||
private static RevCommit createCommit(TestRepository<?> testRepo,
|
||||
|
Reference in New Issue
Block a user