diff --git a/.buckconfig b/.buckconfig index f4c17e3518..b9ca216d97 100644 --- a/.buckconfig +++ b/.buckconfig @@ -25,7 +25,7 @@ src_roots = java, resources, src [project] - ignore = .git, eclipse-out, lib/jgit + ignore = .git, eclipse-out parallel_parsing = true [cache] @@ -35,6 +35,3 @@ [test] excluded_labels = manual -[repositories] - jgit = lib/jgit - diff --git a/gerrit-acceptance-framework/BUCK b/gerrit-acceptance-framework/BUCK index d642942713..ba68fa3f2e 100644 --- a/gerrit-acceptance-framework/BUCK +++ b/gerrit-acceptance-framework/BUCK @@ -14,9 +14,9 @@ DEPS = [ '//lib/httpcomponents:httpclient', '//lib/httpcomponents:httpcore', '//lib/jetty:servlet', + '//lib/jgit/org.eclipse.jgit.junit:junit', '//lib/log:impl_log4j', '//lib/log:log4j', - '@jgit//org.eclipse.jgit.junit:junit', ] PROVIDED = [ @@ -30,9 +30,9 @@ PROVIDED = [ '//gerrit-server:server', '//lib:gson', '//lib:jsch', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/mina:sshd', '//lib:servlet-api-3_1', - '@jgit//org.eclipse.jgit:jgit', ] java_binary( diff --git a/gerrit-acceptance-tests/BUCK b/gerrit-acceptance-tests/BUCK index 9adaa01e2e..d5d0b0d4d4 100644 --- a/gerrit-acceptance-tests/BUCK +++ b/gerrit-acceptance-tests/BUCK @@ -33,8 +33,8 @@ java_library( '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', '//lib/log:api', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/mina:sshd', - '@jgit//org.eclipse.jgit:jgit', ], visibility = [ '//gerrit-plugin-api/...', diff --git a/gerrit-cache-h2/BUCK b/gerrit-cache-h2/BUCK index 36f91ec786..0bc1cb1226 100644 --- a/gerrit-cache-h2/BUCK +++ b/gerrit-cache-h2/BUCK @@ -8,8 +8,8 @@ java_library( '//lib:guava', '//lib:h2', '//lib/guice:guice', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-common/BUCK b/gerrit-common/BUCK index ac2045eef3..530592cd72 100644 --- a/gerrit-common/BUCK +++ b/gerrit-common/BUCK @@ -21,9 +21,9 @@ gwt_module( '//gerrit-prettify:client', '//lib:guava', '//lib:gwtorm_client', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/joda:joda-time', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ], provided_deps = ['//lib:servlet-api-3_1'], visibility = ['PUBLIC'], @@ -41,9 +41,9 @@ java_library( '//lib:guava', '//lib:gwtjsonrpc', '//lib:gwtorm', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/joda:joda-time', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ], provided_deps = ['//lib:servlet-api-3_1'], visibility = ['PUBLIC'], diff --git a/gerrit-gpg/BUCK b/gerrit-gpg/BUCK index 5d193aa743..73d9f04a4e 100644 --- a/gerrit-gpg/BUCK +++ b/gerrit-gpg/BUCK @@ -8,8 +8,8 @@ DEPS = [ '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ] java_library( @@ -50,7 +50,7 @@ java_test( '//lib:truth', '//lib/bouncycastle:bcpg', '//lib/bouncycastle:bcprov', - '@jgit//org.eclipse.jgit.junit:junit', + '//lib/jgit/org.eclipse.jgit.junit:junit', ], source_under_test = [':gpg'], visibility = ['//tools/eclipse:classpath'], diff --git a/gerrit-gwtui-common/BUCK b/gerrit-gwtui-common/BUCK index b417d30e7d..a8ea06ffeb 100644 --- a/gerrit-gwtui-common/BUCK +++ b/gerrit-gwtui-common/BUCK @@ -64,7 +64,7 @@ java_test( ':client', '//lib:junit', '//lib/gwt:user', - '@jgit//org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit:jgit', ], source_under_test = [':client'], vm_args = ['-Xmx512m'], diff --git a/gerrit-httpd/BUCK b/gerrit-httpd/BUCK index e17caede55..d52963ae51 100644 --- a/gerrit-httpd/BUCK +++ b/gerrit-httpd/BUCK @@ -33,10 +33,10 @@ java_library( '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet', '//lib/log:api', '//lib/lucene:lucene-core-and-backward-codecs', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.http.server:jgit-servlet', ], provided_deps = ['//lib:servlet-api-3_1'], visibility = ['PUBLIC'], @@ -69,9 +69,9 @@ java_test( '//lib/easymock:easymock', '//lib/guice:guice', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.junit:junit', '//lib/joda:joda-time', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.junit:junit', ], source_under_test = [':httpd'], # TODO(sop) Remove after Buck supports Eclipse diff --git a/gerrit-lucene/BUCK b/gerrit-lucene/BUCK index 163340ba8f..771a02171a 100644 --- a/gerrit-lucene/BUCK +++ b/gerrit-lucene/BUCK @@ -31,11 +31,11 @@ java_library( '//lib:gwtorm', '//lib/guice:guice', '//lib/guice:guice-assistedinject', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', '//lib/lucene:lucene-analyzers-common', '//lib/lucene:lucene-core-and-backward-codecs', '//lib/lucene:lucene-misc', - '@jgit//org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-openid/BUCK b/gerrit-openid/BUCK index bfbdb431b5..5eace7b6dd 100644 --- a/gerrit-openid/BUCK +++ b/gerrit-openid/BUCK @@ -19,8 +19,8 @@ java_library( '//lib/commons:codec', '//lib/guice:guice', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-patch-jgit/BUCK b/gerrit-patch-jgit/BUCK index 90f5e4e311..d76b6fabea 100644 --- a/gerrit-patch-jgit/BUCK +++ b/gerrit-patch-jgit/BUCK @@ -29,7 +29,7 @@ prebuilt_jar( genrule( name = 'jgit_edit_src', - cmd = 'unzip -qd $TMP $(location @jgit//org.eclipse.jgit:jgit_src) ' + + cmd = 'unzip -qd $TMP $(location //lib/jgit/org.eclipse.jgit:jgit_src) ' + 'org/eclipse/jgit/diff/Edit.java;' + 'cd $TMP;' + 'zip -Dq $OUT org/eclipse/jgit/diff/Edit.java', @@ -46,7 +46,7 @@ java_library( ], deps = [ '//lib:gson', - '@jgit//org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) @@ -56,8 +56,8 @@ java_test( srcs = glob(['src/test/java/**/*.java']), deps = [ ':server', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib:junit', - '@jgit//org.eclipse.jgit:jgit', ], source_under_test = [':server'], visibility = ['//tools/eclipse:classpath'], diff --git a/gerrit-pgm/BUCK b/gerrit-pgm/BUCK index 0737c44264..e62079f5d4 100644 --- a/gerrit-pgm/BUCK +++ b/gerrit-pgm/BUCK @@ -15,9 +15,9 @@ BASE_JETTY_DEPS = [ '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', '//lib/log:log4j', - '@jgit//org.eclipse.jgit:jgit', ] DEPS = BASE_JETTY_DEPS + [ @@ -176,8 +176,8 @@ java_test( '//lib:junit', '//lib/easymock:easymock', '//lib/guice:guice', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.junit:junit', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.junit:junit', ], source_under_test = [':pgm'], ) diff --git a/gerrit-plugin-api/BUCK b/gerrit-plugin-api/BUCK index 2a55afef35..5c075a11e7 100644 --- a/gerrit-plugin-api/BUCK +++ b/gerrit-plugin-api/BUCK @@ -39,11 +39,11 @@ java_library( '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.http.server:jgit-servlet', '//lib/joda:joda-time', '//lib/log:api', '//lib/mina:sshd', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.http.server:jgit-servlet', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-prettify/BUCK b/gerrit-prettify/BUCK index 37f08a0605..bf2e02afd5 100644 --- a/gerrit-prettify/BUCK +++ b/gerrit-prettify/BUCK @@ -29,7 +29,7 @@ java_library( '//gerrit-reviewdb:server', '//lib:guava', '//lib:gwtjsonrpc', - '@jgit//org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-server/BUCK b/gerrit-server/BUCK index 9f66438d5e..922552019b 100644 --- a/gerrit-server/BUCK +++ b/gerrit-server/BUCK @@ -59,6 +59,8 @@ java_library( '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.archive:jgit-archive', '//lib/joda:joda-time', '//lib/log:api', '//lib/log:jsonevent-layout', @@ -70,8 +72,6 @@ java_library( '//lib/ow2:ow2-asm-tree', '//lib/ow2:ow2-asm-util', '//lib/prolog:runtime', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.archive:jgit-archive', ], provided_deps = [ '//lib:servlet-api-3_1', @@ -98,12 +98,12 @@ TESTUTIL_DEPS = [ '//lib:truth', '//lib/guice:guice', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.junit:junit', '//lib/joda:joda-time', '//lib/log:api', '//lib/log:impl_log4j', '//lib/log:log4j', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.junit:junit', ] TESTUTIL = glob([ diff --git a/gerrit-sshd/BUCK b/gerrit-sshd/BUCK index ae70857620..54b83e2631 100644 --- a/gerrit-sshd/BUCK +++ b/gerrit-sshd/BUCK @@ -24,12 +24,12 @@ java_library( '//lib/guice:guice', '//lib/guice:guice-assistedinject', '//lib/guice:guice-servlet', # SSH should not depend on servlet + '//lib/jgit/org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit.archive:jgit-archive', '//lib/log:api', '//lib/log:log4j', '//lib/mina:core', '//lib/mina:sshd', - '@jgit//org.eclipse.jgit:jgit', - '@jgit//org.eclipse.jgit.archive:jgit-archive', ], provided_deps = [ '//lib/bouncycastle:bcprov', diff --git a/gerrit-util-http/BUCK b/gerrit-util-http/BUCK index 32948511bd..cfab0963de 100644 --- a/gerrit-util-http/BUCK +++ b/gerrit-util-http/BUCK @@ -15,7 +15,7 @@ java_library( '//lib:guava', '//lib:servlet-api-3_1', '//lib/httpcomponents:httpclient', - '@jgit//org.eclipse.jgit:jgit', + '//lib/jgit/org.eclipse.jgit:jgit', ], visibility = ['PUBLIC'], ) diff --git a/gerrit-war/BUCK b/gerrit-war/BUCK index b1f0487008..6d74a83021 100644 --- a/gerrit-war/BUCK +++ b/gerrit-war/BUCK @@ -23,8 +23,8 @@ java_library( '//lib:gwtorm', '//lib/guice:guice', '//lib/guice:guice-servlet', + '//lib/jgit/org.eclipse.jgit:jgit', '//lib/log:api', - '@jgit//org.eclipse.jgit:jgit', ], provided_deps = ['//lib:servlet-api-3_1'], visibility = [ diff --git a/lib/jgit/.buckconfig b/lib/jgit/.buckconfig deleted file mode 100644 index e67976e829..0000000000 --- a/lib/jgit/.buckconfig +++ /dev/null @@ -1,7 +0,0 @@ -[cache] - mode = dir - dir = ~/.gerritcodereview/buck-cache/locally-built-artifacts - -[repositories] - jgit = . - diff --git a/lib/jgit/.gitignore b/lib/jgit/.gitignore deleted file mode 100644 index 0a0ddb2efe..0000000000 --- a/lib/jgit/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/buck-out diff --git a/lib/jgit/lib/BUCK b/lib/jgit/lib/BUCK deleted file mode 100644 index fe0bbb1d86..0000000000 --- a/lib/jgit/lib/BUCK +++ /dev/null @@ -1,6 +0,0 @@ -include_defs('//lib/maven.defs') - -define_license(name = 'Apache2.0') -define_license(name = 'jgit') - -define_license(name = 'DO_NOT_DISTRIBUTE') diff --git a/lib/jgit/lib/JGIT_VERSION b/lib/jgit/lib/JGIT_VERSION deleted file mode 120000 index d52b3f9c3c..0000000000 --- a/lib/jgit/lib/JGIT_VERSION +++ /dev/null @@ -1 +0,0 @@ -../../JGIT_VERSION \ No newline at end of file diff --git a/lib/jgit/lib/LICENSE-Apache2.0 b/lib/jgit/lib/LICENSE-Apache2.0 deleted file mode 120000 index de5a79a781..0000000000 --- a/lib/jgit/lib/LICENSE-Apache2.0 +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-Apache2.0 \ No newline at end of file diff --git a/lib/jgit/lib/LICENSE-DO_NOT_DISTRIBUTE b/lib/jgit/lib/LICENSE-DO_NOT_DISTRIBUTE deleted file mode 120000 index 6b0859be2b..0000000000 --- a/lib/jgit/lib/LICENSE-DO_NOT_DISTRIBUTE +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-DO_NOT_DISTRIBUTE \ No newline at end of file diff --git a/lib/jgit/lib/LICENSE-jgit b/lib/jgit/lib/LICENSE-jgit deleted file mode 120000 index bfa3da5c68..0000000000 --- a/lib/jgit/lib/LICENSE-jgit +++ /dev/null @@ -1 +0,0 @@ -../../LICENSE-jgit \ No newline at end of file diff --git a/lib/jgit/lib/maven.defs b/lib/jgit/lib/maven.defs deleted file mode 120000 index 7f9292f8e7..0000000000 --- a/lib/jgit/lib/maven.defs +++ /dev/null @@ -1 +0,0 @@ -../../maven.defs \ No newline at end of file diff --git a/lib/jgit/org.eclipse.jgit.archive/BUCK b/lib/jgit/org.eclipse.jgit.archive/BUCK index 99270e9329..e5aeedd0e0 100644 --- a/lib/jgit/org.eclipse.jgit.archive/BUCK +++ b/lib/jgit/org.eclipse.jgit.archive/BUCK @@ -7,7 +7,7 @@ maven_jar( sha1 = 'c065b765aac56cdbe531634fdfd829a6ce8bbd0c', license = 'jgit', repository = REPO, - deps = ['@jgit//org.eclipse.jgit:jgit'], + deps = ['//lib/jgit/org.eclipse.jgit:jgit'], unsign = True, exclude = [ 'about.html', diff --git a/lib/jgit/org.eclipse.jgit.http.server/BUCK b/lib/jgit/org.eclipse.jgit.http.server/BUCK index aa3351051c..89d0ebacaa 100644 --- a/lib/jgit/org.eclipse.jgit.http.server/BUCK +++ b/lib/jgit/org.eclipse.jgit.http.server/BUCK @@ -7,7 +7,7 @@ maven_jar( sha1 = '516925ff0df67705e368c905a910ed982655cc32', license = 'jgit', repository = REPO, - deps = ['@jgit//org.eclipse.jgit:jgit'], + deps = ['//lib/jgit/org.eclipse.jgit:jgit'], unsign = True, exclude = [ 'about.html', diff --git a/lib/jgit/org.eclipse.jgit.junit/BUCK b/lib/jgit/org.eclipse.jgit.junit/BUCK index bcc583c645..787a3a3aa5 100644 --- a/lib/jgit/org.eclipse.jgit.junit/BUCK +++ b/lib/jgit/org.eclipse.jgit.junit/BUCK @@ -8,5 +8,5 @@ maven_jar( license = 'DO_NOT_DISTRIBUTE', repository = REPO, unsign = True, - deps = ['@jgit//org.eclipse.jgit:jgit'], + deps = ['//lib/jgit/org.eclipse.jgit:jgit'], ) diff --git a/lib/jgit/tools/BUCK b/lib/jgit/tools/BUCK deleted file mode 120000 index 7e536d7580..0000000000 --- a/lib/jgit/tools/BUCK +++ /dev/null @@ -1 +0,0 @@ -../../../tools/BUCK \ No newline at end of file diff --git a/lib/jgit/tools/__init__.py b/lib/jgit/tools/__init__.py deleted file mode 120000 index 737f5853fa..0000000000 --- a/lib/jgit/tools/__init__.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/__init__.py \ No newline at end of file diff --git a/lib/jgit/tools/download_file.py b/lib/jgit/tools/download_file.py deleted file mode 120000 index e49dc4cdc2..0000000000 --- a/lib/jgit/tools/download_file.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/download_file.py \ No newline at end of file diff --git a/lib/jgit/tools/merge_jars.py b/lib/jgit/tools/merge_jars.py deleted file mode 120000 index 399e4184b0..0000000000 --- a/lib/jgit/tools/merge_jars.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/merge_jars.py \ No newline at end of file diff --git a/lib/jgit/tools/pack_war.py b/lib/jgit/tools/pack_war.py deleted file mode 120000 index 8621a6c7d8..0000000000 --- a/lib/jgit/tools/pack_war.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/pack_war.py \ No newline at end of file diff --git a/lib/jgit/tools/util.py b/lib/jgit/tools/util.py deleted file mode 120000 index 8041ac5658..0000000000 --- a/lib/jgit/tools/util.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/util.py \ No newline at end of file diff --git a/lib/jgit/tools/util_test.py b/lib/jgit/tools/util_test.py deleted file mode 120000 index b85ecbddfa..0000000000 --- a/lib/jgit/tools/util_test.py +++ /dev/null @@ -1 +0,0 @@ -../../../tools/util_test.py \ No newline at end of file diff --git a/tools/download_all.py b/tools/download_all.py index bc45714f4b..58316ca2ed 100755 --- a/tools/download_all.py +++ b/tools/download_all.py @@ -19,11 +19,6 @@ from subprocess import check_call, CalledProcessError, Popen, PIPE MAIN = ['//tools/eclipse:classpath'] PAT = re.compile(r'"(//.*?)" -> "//tools:download_file"') -# TODO(davido): Remove this hack when Buck bugs are fixed: -# https://github.com/facebook/buck/issues/656 -# https://github.com/facebook/buck/issues/658 -JGIT = re.compile(r'//org.eclipse.jgit.*') -CELL = '//lib/jgit' opts = OptionParser() opts.add_option('--src', action='store_true') @@ -36,8 +31,6 @@ for line in p.stdout: m = PAT.search(line) if m: n = m.group(1) - if JGIT.match(n): - n = CELL + n[1:] if args.src and n.endswith('__download_bin'): n = n[:-13] + 'src' targets.add(n) diff --git a/tools/eclipse/project.py b/tools/eclipse/project.py index 26b35cf635..4b35f7c1e7 100755 --- a/tools/eclipse/project.py +++ b/tools/eclipse/project.py @@ -131,8 +131,7 @@ def gen_classpath(): continue m = java_library.match(p) - # Don't grab the cross-cell JGit libraries as source - if m and not m.group(1).startswith('org.eclipse.jgit'): + if m: src.add(m.group(1)) else: lib.add(p) diff --git a/tools/pack_war.py b/tools/pack_war.py index cd836a81a3..ca21790ad4 100755 --- a/tools/pack_war.py +++ b/tools/pack_war.py @@ -28,7 +28,6 @@ args, ctx = opts.parse_args() war = args.tmp jars = set() -basenames = set() def prune(l): return [j for e in l for j in e.split(':')] @@ -37,19 +36,10 @@ def link_jars(libs, directory): makedirs(directory) for j in libs: if j not in jars: - # When jgit is consumed from its own cell, - # potential duplicates should be filtered. - # e.g. jsch.jar will be reached through: - # 1. /home/username/projects/gerrit/buck-out/gen/lib/jsch.jar - # 2. /home/username/projects/jgit/buck-out/gen/lib/jsch.jar - if (j.find('jgit/buck-out/gen/lib') > 0 - and path.basename(j) in basenames): - continue jars.add(j) n = path.basename(j) if j.find('buck-out/gen/gerrit-') > 0: n = j[j.find('buck-out'):].split('/')[2] + '-' + n - basenames.add(n) symlink(j, path.join(directory, n)) if args.lib: