diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt index 2c98f1cd94..63ec3833a8 100644 --- a/Documentation/config-gerrit.txt +++ b/Documentation/config-gerrit.txt @@ -3542,7 +3542,7 @@ Defaults to an empty string which means that receiving emails is disabled. The port the email server exposes for receiving emails. + Defaults to the industry standard for a given protocol and encryption: -POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 995. +POP3: 110; POP3S: 995; IMAP: 143; IMAPS: 993. [[receiveemail.username]]receiveemail.username:: + diff --git a/Documentation/config-mail.txt b/Documentation/config-mail.txt index b8a2e5fb85..1adc8d9764 100644 --- a/Documentation/config-mail.txt +++ b/Documentation/config-mail.txt @@ -1,6 +1,7 @@ = Gerrit Code Review - Mail Templates -Gerrit uses Closure Templates for the bulk of the standard mails it sends out. +Gerrit uses link:https://developers.google.com/closure/templates/[Closure Templates] +(Soy) for the bulk of the standard mails it sends out. There are builtin default templates which are used if they are not overridden. These defaults are also provided as examples so that administrators may copy them and easily modify them to tweak their contents. @@ -230,10 +231,6 @@ $patchSet.refname:: + The refname of the patch set. -== SEE ALSO - -* link:https://developers.google.com/closure/templates/[Closure Templates] - GERRIT ------ Part of link:index.html[Gerrit Code Review] diff --git a/Documentation/intro-user.txt b/Documentation/intro-user.txt index b7129db0bc..4d84d999a0 100644 --- a/Documentation/intro-user.txt +++ b/Documentation/intro-user.txt @@ -771,7 +771,7 @@ screens, e.g. configured link:#dashboards[dashboards], quick. == Reply by Email Gerrit sends out email notifications to users and supports parsing back replies -on some of them. +on some of them (when link:config-gerrit.html#receiveemail[configured]). Gerrit supports replies on these notification emails: diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/IndexServlet.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/IndexServlet.java index d7f7a8a9ce..3eb77eaf5c 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/IndexServlet.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/IndexServlet.java @@ -22,8 +22,8 @@ import com.google.gerrit.common.Nullable; import com.google.template.soy.SoyFileSet; import com.google.template.soy.data.SanitizedContent; import com.google.template.soy.data.SoyMapData; -import com.google.template.soy.tofu.SoyTofu; import com.google.template.soy.data.UnsafeSanitizedContentOrdainer; +import com.google.template.soy.tofu.SoyTofu; import java.io.IOException; import java.io.OutputStream; import java.net.URI; @@ -33,16 +33,20 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class IndexServlet extends HttpServlet { + private static final long serialVersionUID = 1L; private final byte[] indexSource; IndexServlet(String canonicalURL, @Nullable String cdnPath) throws URISyntaxException { String resourcePath = "com/google/gerrit/httpd/raw/index.html.soy"; SoyFileSet.Builder builder = SoyFileSet.builder(); builder.add(Resources.getResource(resourcePath)); - SoyTofu.Renderer renderer = builder.build().compileToTofu() - .newRenderer("com.google.gerrit.httpd.raw.Index") - .setContentKind(SanitizedContent.ContentKind.HTML) - .setData(getTemplateData(canonicalURL, cdnPath)); + SoyTofu.Renderer renderer = + builder + .build() + .compileToTofu() + .newRenderer("com.google.gerrit.httpd.raw.Index") + .setContentKind(SanitizedContent.ContentKind.HTML) + .setData(getTemplateData(canonicalURL, cdnPath)); indexSource = renderer.render().getBytes(); } @@ -75,8 +79,9 @@ public class IndexServlet extends HttpServlet { // The resource path must be typed as safe for use in a script src. // TODO(wyatta): Upgrade this to use an appropriate safe URL type. - SanitizedContent sanitizedStaticPath = UnsafeSanitizedContentOrdainer.ordainAsSafe(staticPath, - SanitizedContent.ContentKind.TRUSTED_RESOURCE_URI); + SanitizedContent sanitizedStaticPath = + UnsafeSanitizedContentOrdainer.ordainAsSafe( + staticPath, SanitizedContent.ContentKind.TRUSTED_RESOURCE_URI); return new SoyMapData( "canonicalPath", canonicalPath, diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java index 6e055a9b96..d0d905de73 100644 --- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java +++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/raw/StaticModule.java @@ -33,7 +33,6 @@ import com.google.gerrit.server.config.GerritServerConfig; import com.google.gerrit.server.config.SitePaths; import com.google.inject.Inject; import com.google.inject.Key; -import com.google.inject.Provider; import com.google.inject.Provides; import com.google.inject.ProvisionException; import com.google.inject.Singleton; @@ -252,8 +251,9 @@ public class StaticModule extends ServletModule { @Provides @Singleton @Named(POLYGERRIT_INDEX_SERVLET) - HttpServlet getPolyGerritUiIndexServlet(@CanonicalWebUrl @Nullable String canonicalUrl, - @GerritServerConfig Config cfg) throws URISyntaxException { + HttpServlet getPolyGerritUiIndexServlet( + @CanonicalWebUrl @Nullable String canonicalUrl, @GerritServerConfig Config cfg) + throws URISyntaxException { String cdnPath = cfg.getString("gerrit", null, "cdnPath"); return new IndexServlet(canonicalUrl, cdnPath); } diff --git a/gerrit-httpd/src/test/java/com/google/gerrit/httpd/raw/IndexServletTest.java b/gerrit-httpd/src/test/java/com/google/gerrit/httpd/raw/IndexServletTest.java index ffdbc0b568..7133cf6e9e 100644 --- a/gerrit-httpd/src/test/java/com/google/gerrit/httpd/raw/IndexServletTest.java +++ b/gerrit-httpd/src/test/java/com/google/gerrit/httpd/raw/IndexServletTest.java @@ -14,13 +14,12 @@ package com.google.gerrit.httpd.raw; -import com.google.gerrit.common.Nullable; +import static com.google.common.truth.Truth.assertThat; + import com.google.template.soy.data.SoyMapData; import java.net.URISyntaxException; import org.junit.Test; -import static com.google.common.truth.Truth.assertThat; - public class IndexServletTest { @Test public void noPathAndNoCDN() throws URISyntaxException { @@ -38,8 +37,8 @@ public class IndexServletTest { @Test public void noPathAndCDN() throws URISyntaxException { - SoyMapData data = IndexServlet.getTemplateData("http://example.com/", - "http://my-cdn.com/foo/bar/"); + SoyMapData data = + IndexServlet.getTemplateData("http://example.com/", "http://my-cdn.com/foo/bar/"); assertThat(data.getSingle("canonicalPath").stringValue()).isEqualTo(""); assertThat(data.getSingle("staticResourcePath").stringValue()) .isEqualTo("http://my-cdn.com/foo/bar/"); @@ -47,8 +46,8 @@ public class IndexServletTest { @Test public void pathAndCDN() throws URISyntaxException { - SoyMapData data = IndexServlet.getTemplateData("http://example.com/gerrit", - "http://my-cdn.com/foo/bar/"); + SoyMapData data = + IndexServlet.getTemplateData("http://example.com/gerrit", "http://my-cdn.com/foo/bar/"); assertThat(data.getSingle("canonicalPath").stringValue()).isEqualTo("/gerrit"); assertThat(data.getSingle("staticResourcePath").stringValue()) .isEqualTo("http://my-cdn.com/foo/bar/");