Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  Delete unused download command general preference
  Remove theme preferences
  Remove key_map_type edit preference
  Update description of git_basic_auth_policy field in AuthInfo
  Delete unused GroupDetail and GroupInfo classes
  Delete unused JdbcUtil class
  Schema_181: Fix typo in UI message
  Fix wrong javadoc tags
  Update git submodules
  Documentation: Fix java SDK typo in dev-eclipse.txt
  Upgrade jackson-core to 2.10.2
  Reduce change spamming from CI
  Link checker result to the proper console URL
  Remove unused createCheckPayload() method
  Bazel: Force sourcemaps inlining in polymer bundler

Change-Id: I6b6712173433027f75419bdbab61d74c67e626df
This commit is contained in:
David Pursehouse
2020-01-09 14:12:18 +09:00
22 changed files with 16 additions and 418 deletions

View File

@@ -3,7 +3,7 @@
This document is about configuring Gerrit Code Review into an
Eclipse workspace for development.
Java 8 or later SDK is require
Java 8 or later SDK is required.
[[setup]]
== Project Setup

View File

@@ -1250,7 +1250,6 @@ any account.
)]}'
{
"changes_per_page": 25,
"download_command": "CHECKOUT",
"date_format": "STD",
"time_format": "HHMM_12",
"diff_view": "SIDE_BY_SIDE",
@@ -1304,7 +1303,6 @@ link:#preferences-input[PreferencesInput] entity.
{
"changes_per_page": 50,
"expand_inline_diffs": true,
"download_command": "CHECKOUT",
"date_format": "STD",
"time_format": "HHMM_12",
"size_bar_in_change_table": true,
@@ -1352,7 +1350,6 @@ link:#preferences-info[PreferencesInfo] entity.
{
"changes_per_page": 50,
"expand_inline_diffs": true,
"download_command": "CHECKOUT",
"date_format": "STD",
"time_format": "HHMM_12",
"size_bar_in_change_table": true,
@@ -1414,7 +1411,6 @@ link:#diff-preferences-info[DiffPreferencesInfo] entity.
)]}'
{
"context": 10,
"theme": "DEFAULT",
"ignore_whitespace": "IGNORE_ALL",
"intraline_difference": true,
"line_length": 100,
@@ -1445,7 +1441,6 @@ link:#diff-preferences-input[DiffPreferencesInput] entity.
{
"context": 10,
"theme": "ECLIPSE",
"ignore_whitespace": "IGNORE_ALL",
"intraline_difference": true,
"line_length": 100,
@@ -1471,7 +1466,6 @@ link:#diff-preferences-info[DiffPreferencesInfo] entity.
)]}'
{
"context": 10,
"theme": "ECLIPSE",
"ignore_whitespace": "IGNORE_ALL",
"intraline_difference": true,
"line_length": 100,
@@ -1508,8 +1502,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
)]}'
{
"theme": "ECLIPSE",
"key_map_type": "VIM",
"tab_size": 4,
"line_length": 80,
"indent_unit": 2,
@@ -1541,8 +1533,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
Content-Type: application/json;charset=UTF-8
{
"theme": "ECLIPSE",
"key_map_type": "VIM",
"tab_size": 4,
"line_length": 80,
"indent_unit": 2,
@@ -1569,8 +1559,6 @@ link:#edit-preferences-info[EditPreferencesInfo] entity.
)]}'
{
"theme": "ECLIPSE",
"key_map_type": "VIM",
"tab_size": 4,
"line_length": 80,
"cursor_blink_rate": 530,
@@ -2451,9 +2439,6 @@ preferences of a user.
|Field Name ||Description
|`context` ||
The number of lines of context when viewing a patch.
|`theme` ||
The CodeMirror theme name in upper case, for example `DEFAULT`. All the themes
from the CodeMirror release that Gerrit is using are available.
|`expand_all_comments` |not set if `false`|
Whether all inline comments should be automatically expanded.
|`ignore_whitespace` ||
@@ -2575,12 +2560,6 @@ preferences of a user.
[options="header",cols="1,^1,5"]
|===========================================
|Field Name ||Description
|`theme` ||
The CodeMirror theme name in upper case, for example `DEFAULT`. All the themes
from the CodeMirror release that Gerrit is using are available.
|`key_map_type` ||
The CodeMirror key map. Currently only a subset of key maps are
supported: `DEFAULT`, `EMACS`, `SUBLIME`, `VIM`.
|`tab_size` ||
Number of spaces that should be used to display one tab.
|`line_length` ||
@@ -2736,8 +2715,6 @@ Whether to expand diffs inline instead of opening as separate page
The type of download URL the user prefers to use. May be any key from
the `schemes` map in
link:rest-api-config.html#download-info[DownloadInfo].
|`download_command` ||
The type of download command the user prefers to use.
|`date_format` ||
The format to display the date in.
Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.
@@ -2798,8 +2775,6 @@ Whether to expand diffs inline instead of opening as separate page
(PolyGerrit only).
|`download_scheme` |optional|
The type of download URL the user prefers to use.
|`download_command` |optional|
The type of download command the user prefers to use.
|`date_format` |optional|
The format to display the date in.
Allowed values are `STD`, `US`, `ISO`, `EURO`, `UK`.

View File

@@ -1477,8 +1477,8 @@ type] is `CUSTOM_EXTENSION`.
|`git_basic_auth_policy` |optional|
The link:config-gerrit.html#auth.gitBasicAuthPolicy[policy] to authenticate
Git over HTTP and REST API requests when
link:config-gerrit.html#auth.type[authentication type] is `LDAP`.
Can be `HTTP`, `LDAP` or `HTTP_LDAP`.
link:config-gerrit.html#auth.type[authentication type] is `LDAP`,
`LDAP_BIND` or `OAUTH`. Can be `HTTP`, `LDAP`, `HTTP_LDAP` or `OAUTH`.
|==========================================
[[cache-info]]

40
Jenkinsfile vendored
View File

@@ -23,7 +23,6 @@ class Globals {
static final long curlTimeout = 10000
static final int waitForResultTimeout = 10000
static final String gerritRepositoryNameSha1Suffix = "-a6a0e4682515f3521897c5f950d1394f4619d928"
static final resTicks = [ 'ABORTED':'\u26aa', 'SUCCESS':'\u2705', 'FAILURE':'\u274c' ]
}
class Change {
@@ -54,11 +53,13 @@ class Builds {
class GerritCheck {
String uuid
Build build
String consoleUrl
GerritCheck(name, build) {
this.uuid = "gerritforge:" + name.replaceAll("(bazel/)", "") +
Globals.gerritRepositoryNameSha1Suffix
this.build = build
this.consoleUrl = "${build.url}console"
}
def getCheckResultFromBuild() {
@@ -74,14 +75,6 @@ class GerritCheck {
return "FAILED"
}
}
def createCheckPayload() {
return JsonOutput.toJson([
checker_uuid: uuid,
state: getCheckResultFromBuild(),
url: "${build.url}consoleText"
])
}
}
def hasChangeNumber() {
@@ -89,7 +82,7 @@ def hasChangeNumber() {
}
def postCheck(check) {
gerritCheck(checks: [ "${check.uuid}" : "${check.getCheckResultFromBuild()}" ])
gerritCheck(checks: [ "${check.uuid}" : "${check.getCheckResultFromBuild()}" ], url: "${check.consoleUrl}")
}
def queryChangedFiles(url, changeNum, sha1) {
@@ -247,25 +240,6 @@ def findCodestyleFilesInLog(build) {
return codeStyleFiles
}
def createCodeStyleMsgBody(build, label) {
def codeStyleFiles = findCodestyleFilesInLog(build)
def formattingMsg = label < 0 ? ('The following files need formatting:\n ' +
codeStyleFiles.join('\n ')) : 'All files are correctly formatted'
def url = build.url + "consoleText"
return "${Globals.resTicks[build.result]} $formattingMsg\n (${url})"
}
def createVerifyMsgBody(builds) {
def msgList = builds.collect { type, build -> [
'type': type, 'res': build.result, 'url': build.url + "consoleText" ]
}
return msgList.collect {
"${Globals.resTicks[it.res]} ${it.type} : ${it.res}\n (${it.url})"
} .join('\n')
}
node ('master') {
if (hasChangeNumber()) {
@@ -292,18 +266,14 @@ node ('master') {
stage('Report to Gerrit'){
resCodeStyle = getLabelValue(1, Builds.codeStyle.result)
gerritReview(
labels: ['Code-Style': resCodeStyle],
message: createCodeStyleMsgBody(Builds.codeStyle, resCodeStyle))
gerritReview labels: ['Code-Style': resCodeStyle]
postCheck(new GerritCheck("codestyle", Builds.codeStyle))
def verificationResults = Builds.verification.collect { k, v -> v }
def resVerify = verificationResults.inject(1) {
acc, build -> getLabelValue(acc, build.result)
}
gerritReview(
labels: ['Verified': resVerify],
message: createVerifyMsgBody(Builds.verification))
gerritReview labels: ['Verified': resVerify]
Builds.verification.each { type, build -> postCheck(
new GerritCheck(type, build)

View File

@@ -1,37 +0,0 @@
// Copyright (C) 2008 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.common.data;
import com.google.gerrit.entities.Account;
import com.google.gerrit.entities.AccountGroup;
import java.util.Set;
public class GroupDetail {
private Set<Account.Id> members;
private Set<AccountGroup.UUID> includes;
public GroupDetail(Set<Account.Id> members, Set<AccountGroup.UUID> includes) {
this.members = members;
this.includes = includes;
}
public Set<Account.Id> getMembers() {
return members;
}
public Set<AccountGroup.UUID> getIncludes() {
return includes;
}
}

View File

@@ -1,71 +0,0 @@
// Copyright (C) 2011 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.common.data;
import com.google.gerrit.entities.AccountGroup;
/** Summary information about an {@link AccountGroup}, for simple tabular displays. */
public class GroupInfo {
protected AccountGroup.UUID uuid;
protected String name;
protected String description;
protected String url;
protected GroupInfo() {}
/**
* Create an anonymous group info, when only the id is known.
*
* <p>This constructor should only be a last-ditch effort, when the usual group lookup has failed
* and a stale group id has been discovered in the data store.
*/
public GroupInfo(AccountGroup.UUID uuid) {
this.uuid = uuid;
}
/**
* Create a group description from a real data store record.
*
* @param a the data store record holding the specific group details.
*/
public GroupInfo(GroupDescription.Basic a) {
uuid = a.getGroupUUID();
name = a.getName();
url = a.getUrl();
if (a instanceof GroupDescription.Internal) {
description = ((GroupDescription.Internal) a).getDescription();
}
}
/** @return the unique local id of the group */
public AccountGroup.UUID getId() {
return uuid;
}
/** @return the name of the group; null if not supplied */
public String getName() {
return name;
}
/** @return the description of the group; null if not supplied */
public String getDescription() {
return description;
}
public String getUrl() {
return url;
}
}

View File

@@ -60,7 +60,6 @@ public class DiffPreferencesInfo {
public Boolean hideEmptyPane;
public Boolean matchBrackets;
public Boolean lineWrapping;
public Theme theme;
public Whitespace ignoreWhitespace;
public Boolean retainHeader;
public Boolean skipDeleted;
@@ -88,7 +87,6 @@ public class DiffPreferencesInfo {
i.hideEmptyPane = false;
i.matchBrackets = false;
i.lineWrapping = false;
i.theme = Theme.DEFAULT;
i.ignoreWhitespace = Whitespace.IGNORE_NONE;
i.retainHeader = false;
i.skipDeleted = false;

View File

@@ -30,8 +30,6 @@ public class EditPreferencesInfo {
public Boolean indentWithTabs;
public Boolean autoCloseBrackets;
public Boolean showBase;
public Theme theme;
public KeyMapType keyMapType;
public static EditPreferencesInfo defaults() {
EditPreferencesInfo i = new EditPreferencesInfo();
@@ -49,8 +47,6 @@ public class EditPreferencesInfo {
i.indentWithTabs = false;
i.autoCloseBrackets = false;
i.showBase = false;
i.theme = Theme.DEFAULT;
i.keyMapType = KeyMapType.DEFAULT;
return i;
}
}

View File

@@ -124,8 +124,6 @@ public class GeneralPreferencesInfo {
public Integer changesPerPage;
/** Type of download URL the user prefers to use. */
public String downloadScheme;
/** Type of download command the user prefers to use. */
public DownloadCommand downloadCommand;
public DateFormat dateFormat;
public TimeFormat timeFormat;
@@ -184,7 +182,6 @@ public class GeneralPreferencesInfo {
GeneralPreferencesInfo p = new GeneralPreferencesInfo();
p.changesPerPage = DEFAULT_PAGESIZE;
p.downloadScheme = null;
p.downloadCommand = DownloadCommand.CHECKOUT;
p.dateFormat = DateFormat.STD;
p.timeFormat = TimeFormat.HHMM_12;
p.expandInlineDiffs = false;

View File

@@ -1,22 +0,0 @@
// Copyright (C) 2015 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.client;
public enum KeyMapType {
DEFAULT,
EMACS,
SUBLIME,
VIM
}

View File

@@ -1,123 +0,0 @@
// Copyright (C) 2014 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.extensions.client;
public enum Theme {
// Light themes
DEFAULT,
DAY_3024,
DUOTONE_LIGHT,
BASE16_LIGHT,
ECLIPSE,
ELEGANT,
MDN_LIKE,
NEAT,
NEO,
PARAISO_LIGHT,
SOLARIZED,
TTCN,
XQ_LIGHT,
YETI,
// Dark themes
NIGHT_3024,
ABCDEF,
AMBIANCE,
BASE16_DARK,
BESPIN,
BLACKBOARD,
COBALT,
COLORFORTH,
DRACULA,
DUOTONE_DARK,
ERLANG_DARK,
HOPSCOTCH,
ICECODER,
ISOTOPE,
LESSER_DARK,
LIQUIBYTE,
MATERIAL,
MBO,
MIDNIGHT,
MONOKAI,
NIGHT,
PARAISO_DARK,
PASTEL_ON_DARK,
RAILSCASTS,
RUBYBLUE,
SETI,
THE_MATRIX,
TOMORROW_NIGHT_BRIGHT,
TOMORROW_NIGHT_EIGHTIES,
TWILIGHT,
VIBRANT_INK,
XQ_DARK,
ZENBURN;
public boolean isDark() {
switch (this) {
case ABCDEF:
case AMBIANCE:
case BASE16_DARK:
case BESPIN:
case BLACKBOARD:
case COBALT:
case COLORFORTH:
case DRACULA:
case DUOTONE_DARK:
case ERLANG_DARK:
case HOPSCOTCH:
case ICECODER:
case ISOTOPE:
case LESSER_DARK:
case LIQUIBYTE:
case MATERIAL:
case MBO:
case MIDNIGHT:
case MONOKAI:
case NIGHT:
case NIGHT_3024:
case PARAISO_DARK:
case PASTEL_ON_DARK:
case RAILSCASTS:
case RUBYBLUE:
case SETI:
case THE_MATRIX:
case TOMORROW_NIGHT_BRIGHT:
case TOMORROW_NIGHT_EIGHTIES:
case TWILIGHT:
case VIBRANT_INK:
case XQ_DARK:
case ZENBURN:
return true;
case BASE16_LIGHT:
case DEFAULT:
case DAY_3024:
case DUOTONE_LIGHT:
case ECLIPSE:
case ELEGANT:
case MDN_LIKE:
case NEAT:
case NEO:
case PARAISO_LIGHT:
case SOLARIZED:
case TTCN:
case XQ_LIGHT:
case YETI:
default:
return false;
}
}
}

View File

@@ -80,7 +80,7 @@ public class DynamicOptions {
* .to(MyOptionsClassNameProvider.class);
*
* static class MyOptionsClassNameProvider implements DynamicOptions.ClassNameProvider {
* @Override
* {@literal @}Override
* public String getClassName() {
* return "com.googlesource.gerrit.plugins.myplugin.CommandOptions";
* }
@@ -107,11 +107,11 @@ public class DynamicOptions {
* .to(MyOptionsModulesClassNamesProvider.class);
*
* static class MyOptionsModulesClassNamesProvider implements DynamicOptions.ClassNameProvider {
* @Override
* {@literal @}Override
* public String getClassName() {
* return "com.googlesource.gerrit.plugins.myplugin.CommandOptions";
* }
* @Override
* {@literal @}Override
* public Iterable<String> getModulesClassNames()() {
* return "com.googlesource.gerrit.plugins.myplugin.MyOptionsModule";
* }

View File

@@ -23,13 +23,10 @@ import com.google.gerrit.extensions.client.GeneralPreferencesInfo;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DateFormat;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DefaultBase;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DiffView;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailFormat;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.TimeFormat;
import com.google.gerrit.extensions.client.KeyMapType;
import com.google.gerrit.extensions.client.MenuItem;
import com.google.gerrit.extensions.client.Theme;
import java.util.Optional;
@AutoValue
@@ -40,8 +37,6 @@ public abstract class Preferences {
public abstract Optional<String> downloadScheme();
public abstract Optional<DownloadCommand> downloadCommand();
public abstract Optional<DateFormat> dateFormat();
public abstract Optional<TimeFormat> timeFormat();
@@ -82,8 +77,6 @@ public abstract class Preferences {
abstract Builder downloadScheme(@Nullable String val);
abstract Builder downloadCommand(@Nullable DownloadCommand val);
abstract Builder dateFormat(@Nullable DateFormat val);
abstract Builder timeFormat(@Nullable TimeFormat val);
@@ -125,7 +118,6 @@ public abstract class Preferences {
return (new AutoValue_Preferences_General.Builder())
.changesPerPage(info.changesPerPage)
.downloadScheme(info.downloadScheme)
.downloadCommand(info.downloadCommand)
.dateFormat(info.dateFormat)
.timeFormat(info.timeFormat)
.expandInlineDiffs(info.expandInlineDiffs)
@@ -150,7 +142,6 @@ public abstract class Preferences {
GeneralPreferencesInfo info = new GeneralPreferencesInfo();
info.changesPerPage = changesPerPage().orElse(null);
info.downloadScheme = downloadScheme().orElse(null);
info.downloadCommand = downloadCommand().orElse(null);
info.dateFormat = dateFormat().orElse(null);
info.timeFormat = timeFormat().orElse(null);
info.expandInlineDiffs = expandInlineDiffs().orElse(null);
@@ -202,10 +193,6 @@ public abstract class Preferences {
public abstract Optional<Boolean> showBase();
public abstract Optional<Theme> theme();
public abstract Optional<KeyMapType> keyMapType();
@AutoValue.Builder
public abstract static class Builder {
abstract Builder tabSize(@Nullable Integer val);
@@ -236,10 +223,6 @@ public abstract class Preferences {
abstract Builder showBase(@Nullable Boolean val);
abstract Builder theme(@Nullable Theme val);
abstract Builder keyMapType(@Nullable KeyMapType val);
abstract Edit build();
}
@@ -259,8 +242,6 @@ public abstract class Preferences {
.indentWithTabs(info.indentWithTabs)
.autoCloseBrackets(info.autoCloseBrackets)
.showBase(info.showBase)
.theme(info.theme)
.keyMapType(info.keyMapType)
.build();
}
@@ -280,8 +261,6 @@ public abstract class Preferences {
info.indentWithTabs = indentWithTabs().orElse(null);
info.autoCloseBrackets = autoCloseBrackets().orElse(null);
info.showBase = showBase().orElse(null);
info.theme = theme().orElse(null);
info.keyMapType = keyMapType().orElse(null);
return info;
}
}
@@ -326,8 +305,6 @@ public abstract class Preferences {
public abstract Optional<Boolean> lineWrapping();
public abstract Optional<Theme> theme();
public abstract Optional<Whitespace> ignoreWhitespace();
public abstract Optional<Boolean> retainHeader();
@@ -378,8 +355,6 @@ public abstract class Preferences {
abstract Builder lineWrapping(@Nullable Boolean val);
abstract Builder theme(@Nullable Theme val);
abstract Builder ignoreWhitespace(@Nullable Whitespace val);
abstract Builder retainHeader(@Nullable Boolean val);
@@ -414,7 +389,6 @@ public abstract class Preferences {
.hideEmptyPane(info.hideEmptyPane)
.matchBrackets(info.matchBrackets)
.lineWrapping(info.lineWrapping)
.theme(info.theme)
.ignoreWhitespace(info.ignoreWhitespace)
.retainHeader(info.retainHeader)
.skipDeleted(info.skipDeleted)
@@ -444,7 +418,6 @@ public abstract class Preferences {
info.hideEmptyPane = hideEmptyPane().orElse(null);
info.matchBrackets = matchBrackets().orElse(null);
info.lineWrapping = lineWrapping().orElse(null);
info.theme = theme().orElse(null);
info.ignoreWhitespace = ignoreWhitespace().orElse(null);
info.retainHeader = retainHeader().orElse(null);
info.skipDeleted = skipDeleted().orElse(null);

View File

@@ -72,7 +72,7 @@ import org.eclipse.jgit.lib.Repository;
* private final PermissionBackend permissions;
* private final Provider<CurrentUser> user;
*
* @Inject
* {@literal @}Inject
* Foo(PermissionBackend permissions, Provider<CurrentUser> user) {
* this.permissions = permissions;
* this.user = user;

View File

@@ -1,39 +0,0 @@
// Copyright (C) 2012 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.gerrit.server.schema;
import com.google.gerrit.common.UsedAt;
public class JdbcUtil {
public static String hostname(String hostname) {
if (hostname == null || hostname.isEmpty()) {
hostname = "localhost";
} else if (hostname.contains(":") && !hostname.startsWith("[")) {
hostname = "[" + hostname + "]";
}
return hostname;
}
// TODO(dborowitz): Still used by plugins post-ReviewDb?
@UsedAt(UsedAt.Project.PLUGINS_ALL)
public static String port(String port) {
if (port != null && !port.isEmpty()) {
return ":" + port;
}
return "";
}
}

View File

@@ -20,7 +20,7 @@ import org.eclipse.jgit.lib.Repository;
public class Schema_181 implements NoteDbSchemaVersion {
@Override
public void upgrade(Arguments args, UpdateUI ui) throws Exception {
ui.message("Rebuild GPGP note map to build subkey to master key map");
ui.message("Rebuild GPG note map to build subkey to master key map");
try (Repository repo = args.repoManager.openRepository(args.allUsers);
PublicKeyStore store = new PublicKeyStore(repo)) {
store.rebuildSubkeyMasterKeyMap();

View File

@@ -21,7 +21,6 @@ import com.google.gerrit.acceptance.AbstractDaemonTest;
import com.google.gerrit.acceptance.NoHttpd;
import com.google.gerrit.extensions.client.DiffPreferencesInfo;
import com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace;
import com.google.gerrit.extensions.client.Theme;
import org.junit.Test;
@NoHttpd
@@ -43,7 +42,6 @@ public class DiffPreferencesIT extends AbstractDaemonTest {
i.fontSize *= -1;
i.lineLength *= -1;
i.cursorBlinkRate = 500;
i.theme = Theme.MIDNIGHT;
i.ignoreWhitespace = Whitespace.IGNORE_ALL;
i.expandAllComments ^= true;
i.intralineDifference ^= true;

View File

@@ -19,8 +19,6 @@ import static com.google.common.truth.Truth.assertThat;
import com.google.gerrit.acceptance.AbstractDaemonTest;
import com.google.gerrit.acceptance.NoHttpd;
import com.google.gerrit.extensions.client.EditPreferencesInfo;
import com.google.gerrit.extensions.client.KeyMapType;
import com.google.gerrit.extensions.client.Theme;
import org.junit.Test;
@NoHttpd
@@ -43,8 +41,6 @@ public class EditPreferencesIT extends AbstractDaemonTest {
assertThat(out.indentWithTabs).isNull();
assertThat(out.autoCloseBrackets).isNull();
assertThat(out.showBase).isNull();
assertThat(out.theme).isEqualTo(Theme.DEFAULT);
assertThat(out.keyMapType).isEqualTo(KeyMapType.DEFAULT);
// change some default values
out.lineLength = 80;
@@ -61,8 +57,6 @@ public class EditPreferencesIT extends AbstractDaemonTest {
out.indentWithTabs = true;
out.autoCloseBrackets = true;
out.showBase = true;
out.theme = Theme.TWILIGHT;
out.keyMapType = KeyMapType.EMACS;
EditPreferencesInfo info = gApi.accounts().id(admin.id().toString()).setEditPreferences(out);
@@ -94,7 +88,5 @@ public class EditPreferencesIT extends AbstractDaemonTest {
assertThat(out.indentWithTabs).isEqualTo(in.indentWithTabs);
assertThat(out.autoCloseBrackets).isEqualTo(in.autoCloseBrackets);
assertThat(out.showBase).isEqualTo(in.showBase);
assertThat(out.theme).isEqualTo(in.theme);
assertThat(out.keyMapType).isEqualTo(in.keyMapType);
}
}

View File

@@ -27,7 +27,6 @@ import com.google.gerrit.extensions.client.GeneralPreferencesInfo;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DateFormat;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DefaultBase;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DiffView;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.DownloadCommand;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailFormat;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.EmailStrategy;
import com.google.gerrit.extensions.client.GeneralPreferencesInfo.TimeFormat;
@@ -69,7 +68,6 @@ public class GeneralPreferencesIT extends AbstractDaemonTest {
// change all default values
i.changesPerPage *= -1;
i.downloadCommand = DownloadCommand.REPO_DOWNLOAD;
i.dateFormat = DateFormat.US;
i.timeFormat = TimeFormat.HHMM_24;
i.emailStrategy = EmailStrategy.DISABLED;

View File

@@ -22,7 +22,6 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.concurrent.TimeUnit.MINUTES;
import static java.util.concurrent.TimeUnit.SECONDS;
import com.google.gerrit.extensions.client.Theme;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -48,8 +47,6 @@ public class ConfigUtilTest {
public String s;
public String sd;
public String nd;
public Theme t;
public Theme td;
public List<String> list;
public Map<String, String> map;
@@ -67,8 +64,6 @@ public class ConfigUtilTest {
i.s = "foo";
i.sd = "bar";
// i.nd = null; // Don't need to explicitly set it; it's null by default
i.t = Theme.DEFAULT;
i.td = Theme.DEFAULT;
return i;
}
}
@@ -86,7 +81,6 @@ public class ConfigUtilTest {
in.bb = true;
in.bd = false;
in.s = "baz";
in.t = Theme.MIDNIGHT;
Config cfg = new Config();
ConfigUtil.storeSection(cfg, SECT, SUB, in, d);
@@ -117,8 +111,6 @@ public class ConfigUtilTest {
assertThat(out.s).isEqualTo(in.s);
assertThat(out.sd).isEqualTo(d.sd);
assertThat(out.nd).isNull();
assertThat(out.t).isEqualTo(in.t);
assertThat(out.td).isEqualTo(d.td);
}
@Test

View File

@@ -323,6 +323,7 @@ def _bundle_impl(ctx):
"$p/" + ctx.file._bundler_archive.path,
"--inline-scripts",
"--inline-css",
"--sourcemaps",
"--strip-comments",
"--out-file",
"$p/" + bundled.path,

View File

@@ -108,8 +108,8 @@ def declare_nongoogle_deps():
maven_jar(
name = "jackson-core",
artifact = "com.fasterxml.jackson.core:jackson-core:2.10.1",
sha1 = "2c8b5e26ba40e5f91eb37a24075a2028b402c5f9",
artifact = "com.fasterxml.jackson.core:jackson-core:2.10.2",
sha1 = "73d4322a6bda684f676a2b5fe918361c4e5c7cca",
)
# Test-only dependencies below.