Merge branch 'stable-2.14' into stable-2.15

* stable-2.14:
  Revert "Migrate from old-style legacy .java provider to the new JavaInfo."
  Catch all exceptions for reporting on Schema_130 migration

Change-Id: I06688c3e2f51daead715e232186d74d4fc7fcdf6
This commit is contained in:
David Pursehouse
2019-08-14 15:05:20 +09:00
2 changed files with 4 additions and 6 deletions

View File

@@ -25,10 +25,8 @@ import com.google.gerrit.server.git.MetaDataUpdate;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Provider;
import java.io.IOException;
import java.util.SortedSet;
import java.util.TreeSet;
import org.eclipse.jgit.errors.ConfigInvalidException;
import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.lib.Repository;
@@ -66,7 +64,7 @@ public class Schema_130 extends SchemaVersion {
repoUpgraded.add(projectName);
}
cfg.save(serverUser, COMMIT_MSG);
} catch (ConfigInvalidException | IOException ex) {
} catch (Exception ex) {
throw new OrmException("Cannot migrate project " + projectName, ex);
}
}

View File

@@ -77,8 +77,8 @@ def _war_impl(ctx):
# Add lib
transitive_libs = []
for j in ctx.attr.libs:
if hasattr(j, "JavaInfo"):
transitive_libs.append(j[JavaInfo].transitive_runtime_deps)
if hasattr(j, "java"):
transitive_libs.append(j.java.transitive_runtime_deps)
elif hasattr(j, "files"):
transitive_libs.append(j.files)
@@ -90,7 +90,7 @@ def _war_impl(ctx):
# Add pgm lib
transitive_pgmlibs = []
for j in ctx.attr.pgmlibs:
transitive_pgmlibs.append(j[JavaInfo].transitive_runtime_deps)
transitive_pgmlibs.append(j.java.transitive_runtime_deps)
transitive_pgmlib_deps = depset(transitive = transitive_pgmlibs)
for dep in transitive_pgmlib_deps.to_list():