This includes a new method on Repository, so our subclass needs to be updated. Also requires disabling atomic updates on InMemoryRepositoryMangers used by acceptance tests, since a bug in the atomic implementation causes BanCommitIT to fail: FAILURE com.google.gerrit.acceptance.rest.project.BanCommitIT banCommit: Not true that null reference starts with <"contains banned commit"> java.lang.AssertionError: Not true that null reference starts with <"contains banned commit"> at com.google.common.truth.FailureStrategy.fail(FailureStrategy.java:24) at com.google.common.truth.FailureStrategy.fail(FailureStrategy.java:20) at com.google.common.truth.Subject.failWithRawMessage(Subject.java:381) at com.google.common.truth.StringSubject.startsWith(StringSubject.java:167) at com.google.gerrit.acceptance.rest.project.BanCommitIT.banCommit(BanCommitIT.java:49) This is because ReceiveCommits rejects the command but still executes the batch, and the relevant part of InMemoryRepository doesn't ensure updates are NOT_ATTEMPTED before trying to apply them. Change-Id: Icd2485c51723119c897406806e2f6e086831df3e
90 lines
1.9 KiB
Python
90 lines
1.9 KiB
Python
include_defs('//lib/maven.defs')
|
|
|
|
REPO = GERRIT # Leave here even if set to MAVEN_CENTRAL.
|
|
VERS = '4.2.0.201511101648-m1.136-g91a3f17'
|
|
|
|
maven_jar(
|
|
name = 'jgit',
|
|
id = 'org.eclipse.jgit:org.eclipse.jgit:' + VERS,
|
|
bin_sha1 = '6820c375589d520600210a5e6fa9c427c98da9f9',
|
|
src_sha1 = '84566ffe5dd8a099ef55eca29d073e64a290f464',
|
|
license = 'jgit',
|
|
repository = REPO,
|
|
unsign = True,
|
|
deps = [':ewah'],
|
|
exclude = [
|
|
'META-INF/eclipse.inf',
|
|
'about.html',
|
|
'plugin.properties',
|
|
],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'jgit-servlet',
|
|
id = 'org.eclipse.jgit:org.eclipse.jgit.http.server:' + VERS,
|
|
sha1 = 'e156f06051cf431e72239e84cb85f554d90a7ef0',
|
|
license = 'jgit',
|
|
repository = REPO,
|
|
deps = [':jgit'],
|
|
unsign = True,
|
|
exclude = [
|
|
'about.html',
|
|
'plugin.properties',
|
|
],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'jgit-archive',
|
|
id = 'org.eclipse.jgit:org.eclipse.jgit.archive:' + VERS,
|
|
sha1 = '7bbb559e7f90fa7aeb4ff6867c428d1456861e50',
|
|
license = 'jgit',
|
|
repository = REPO,
|
|
deps = [':jgit',
|
|
'//lib/commons:compress',
|
|
'//lib:tukaani-xz',
|
|
],
|
|
unsign = True,
|
|
exclude = [
|
|
'about.html',
|
|
'plugin.properties',
|
|
],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'junit',
|
|
id = 'org.eclipse.jgit:org.eclipse.jgit.junit:' + VERS,
|
|
sha1 = 'a88ce61fd778ea8b17ae2235ae594ddc59f9bf39',
|
|
license = 'DO_NOT_DISTRIBUTE',
|
|
repository = REPO,
|
|
unsign = True,
|
|
deps = [':jgit'],
|
|
)
|
|
|
|
maven_jar(
|
|
name = 'ewah',
|
|
id = 'com.googlecode.javaewah:JavaEWAH:0.7.9',
|
|
sha1 = 'eceaf316a8faf0e794296ebe158ae110c7d72a5a',
|
|
license = 'Apache2.0',
|
|
)
|
|
|
|
gwt_module(
|
|
name = 'Edit',
|
|
srcs = [':jgit_edit_src'],
|
|
deps = [':edit_src'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
prebuilt_jar(
|
|
name = 'edit_src',
|
|
binary_jar = ':jgit_edit_src',
|
|
)
|
|
|
|
genrule(
|
|
name = 'jgit_edit_src',
|
|
cmd = 'unzip -qd $TMP $(location :jgit_src) ' +
|
|
'org/eclipse/jgit/diff/Edit.java;' +
|
|
'cd $TMP;' +
|
|
'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java',
|
|
out = 'edit.src.zip',
|
|
)
|