Merge branch 'stable-2.8'

* stable-2.8:
  Replace "\--" with "--" in documentation.
  Warn in 2.8 rel. notes that ChangeScreen2 needs download-commands plugin
  Add warning about removal of `approve` alias to 2.8 release notes
  Add one more fix in the 2.8 release notes
  Update 2.8 release notes with changes from stable-2.6 and stable-2.7
  Update 2.8.1 release notes with recently merged changes
  Fix ArrayIndexOutOfBoundsException on initial commits
  SideBySide2: Map .py files to text/x-python
  SideBySide2: Map *.cxx and *.hxx to clike CodeMirror mode
  Enable syntax coloring for Go, BUCK and .gitmodules

Conflicts:
	Documentation/pgm-daemon.txt
	Documentation/pgm-init.txt
	gerrit-server/src/main/java/com/google/gerrit/server/DefaultFileExtensionRegistry.java

Change-Id: I05c5d47c72d2a5fb524a0622b57ba607fed3bfe3
This commit is contained in:
David Pursehouse 2013-12-10 17:57:46 +09:00
commit 28e5237c19
9 changed files with 148 additions and 40 deletions

View File

@ -61,7 +61,7 @@ testing site for development use:
----
Accept defaults by pressing Enter until 'init' completes, or add
the '\--batch' command line option to avoid them entirely. It is
the '--batch' command line option to avoid them entirely. It is
recommended to change the listen addresses from '*' to 'localhost' to
prevent outside connections from contacting the development instance.

View File

@ -38,11 +38,11 @@ OPTIONS
-------
-d::
\--site-path::
--site-path::
Location of the gerrit.config file, and all other per-site
configuration data, supporting libraries and log files.
\--threads::
--threads::
Number of threads to perform the scan work with. Defaults to
twice the number of CPUs available.

View File

@ -10,12 +10,12 @@ SYNOPSIS
--
'java' -jar gerrit.war 'daemon'
-d <SITE_PATH>
[\--enable-httpd | \--disable-httpd]
[\--enable-sshd | \--disable-sshd]
[\--console-log]
[\--slave]
[\--headless]
[\--init]
[--enable-httpd | --disable-httpd]
[--enable-sshd | --disable-sshd]
[--console-log]
[--slave]
[--headless]
[--init]
[-s]
--
@ -35,42 +35,42 @@ OPTIONS
-------
-d::
\--site-path::
--site-path::
Location of the gerrit.config file, and all other per-site
configuration data, supporting libraries and log files.
\--enable-httpd::
\--disable-httpd::
--enable-httpd::
--disable-httpd::
Enable (or disable) the internal HTTP daemon, answering
web requests. Enabled by default.
\--enable-sshd::
\--disable-sshd::
--enable-sshd::
--disable-sshd::
Enable (or disable) the internal SSH daemon, answering SSH
clients and remotely executed commands. Enabled by default.
\--slave::
--slave::
Run in slave mode, permitting only read operations
by clients. Commands which modify state such as
link:cmd-receive-pack.html[receive-pack] (creates new changes
or updates existing ones) or link:cmd-review.html[review]
(sets approve marks) are disabled.
+
This option automatically implies '\--disable-httpd \--enable-sshd'.
This option automatically implies '--disable-httpd --enable-sshd'.
\--console-log::
--console-log::
Send log messages to the console, instead of to the standard
log file '$site_path/logs/error_log'.
\--headless::
--headless::
Don't start the default Gerrit UI. May be useful when Gerrit is
run with an alternative UI.
\--init::
--init::
Run init before starting the daemon. This will create a new site or
upgrade an existing site.
\--s::
--s::
Start link:dev-inspector.html[Gerrit Inspector] on the console, a
built-in interactive inspection environment to assist debugging and
troubleshooting of Gerrit code.

View File

@ -25,7 +25,7 @@ OPTIONS
-------
-d::
\--site-path::
--site-path::
Location of the gerrit.config file, and all other per-site
configuration data, supporting libraries and log files.

View File

@ -10,10 +10,10 @@ SYNOPSIS
--
'java' -jar gerrit.war 'init'
-d <SITE_PATH>
[\--batch]
[\--no-auto-start]
[\--list-plugins]
[\--install-plugin=<PLUGIN_NAME>]
[--batch]
[--no-auto-start]
[--list-plugins]
[--install-plugin=<PLUGIN_NAME>]
--
DESCRIPTION
@ -27,7 +27,7 @@ as necessary.
OPTIONS
-------
\--batch::
--batch::
Run in batch mode, skipping interactive prompts. Reasonable
configuration defaults are chosen based on the whims of
the Gerrit developers.
@ -37,21 +37,21 @@ are detected they are *not* automatically dropped, but only a list of
SQL statements to drop these objects is provided. To drop the unused
objects these SQL statements have to be executed manually.
\--no-auto-start::
--no-auto-start::
Don't automatically start the daemon after initializing a
newly created site path. This permits the administrator
to inspect and modify the configuration before the daemon
is started.
-d::
\--site-path::
--site-path::
Location of the gerrit.config file, and all other per-site
configuration data, supporting libraries and log files.
\--list-plugins::
--list-plugins::
Print names of plugins that can be installed during init process.
\--install-plugin:
--install-plugin:
Automatically install plugin with given name without asking.
This option may be supplied more than once to install multiple
plugins.

View File

@ -14,3 +14,18 @@ After rebasing the first change the other changes disappeared from the related c
* Fix plugin API packaging. Parts from JGit signed library were included in the
plugin API. As a consequence unit tests were failing to execute against it.
* Fix IllegalArgumentException in task queue comparator.
+
This could happen if you have a long queue and the state of a task (DONE, CANCELLED,
RUNNING, READY, SLEEPING, OTHER) changes while the sorting is ongoing.
* Delegate to the filters for init and destroy phases in AllRequestFilter.
+
This fixes a bug that prevented javamelody from working properly.
* Fix ArrayOutOfBoundsException on initial commits.
+
This happened if a new patch set was given for an initial commit in a repository.
* Enable syntax highlighting for CXX, HXX, Python, Go, BUCK and .gitmodules.

View File

@ -27,6 +27,24 @@ found to be missing. This is a change in behavior of the replication plugin. To
back to the old behavior, set the parameter `remote.NAME.createMissingRepositories`
in the `replication.config` file to `false`.
*WARNING:* The deprecated `approve` alias for the
link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.8/cmd-review.html[
review] SSH command has been removed. This is important for all users
of the Jenkins link:https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger[
Gerrit Trigger Plugin] since this plugin by default uses the `approve`
command to vote and comment on changes in Gerrit. If you use the Gerrit
Trigger Plugin, go to its global configuration in Jenkins and adapt the
Gerrit commands to use the `review` command instead of the `approve`
command.
*WARNING:* The new change screen only displays download commands if the
`download-commands` core plugin or any other plugin providing download
commands is installed. The `download-commands` plugin provides the
standard download schemes and commands. It is packaged together with
Gerrit and can be installed during the
link:https://gerrit-review.googlesource.com/Documentation/pgm-init.html[
site initialization].
Release Highlights
------------------
@ -571,6 +589,32 @@ Fix handling of projects with trailing ".git" suffix.
* Allow usernames to begin with digit.
* Verify access to source ref during add branch operation.
+
Previously Gerrit didn't check access to source ref during add branch
operation. Because of that users could create a branch from any known
commit SHA1, even when they didn't have access to that commit.
* Fix Gerrit API sources JAR contents.
+
The gerrit-extension-api-X.Y-all-sources.jar did not actually contain any
sources.
* Generate javadoc for Gerrit Extension and Plugin APIs.
* link:https://code.google.com/p/gerrit/issues/detail?id=2244[Issue 2244]:
Update patch status before skipping duplicate emails.
* link:https://code.google.com/p/gerrit/issues/detail?id=1640[Issue 1640]:
Catch missing LDAP accounts in group membership.
* Use `rev-parse` to find gitdir when generating commit-msg hook hint.
* Performance Fix: Minimize number of advertisedHaves.
+
By filtering the refs before the objectIds are added to advertisedHaves,
lots of time can be saved when pushing to complex Gits.
Configuration
~~~~~~~~~~~~~
@ -595,6 +639,8 @@ Support optional Certificate Revocation List (CRL) with `CLIENT_SSL_CERT_LDAP`.
* Do not override error and gc logging configuration provided by the
`-Dlog4j.configuration` parameter.
* Fix JdbcSQLException when numbers are read from cache.
Web UI
~~~~~~
@ -614,6 +660,12 @@ Correctly populate the list of watched changes when watching more than one proje
* Display "Working..." when header is hidden.
* link:https://code.google.com/p/gerrit/issues/detail?id=2125[Issue 2125]:
Correctly shows '-1' instead of '1' for label score.
+
If a user voted '-1', and then another user voted '+1' for a label, the
label was shown as a red '1' in the change list instead of red '-1'.
Change Screens
^^^^^^^^^^^^^^
@ -635,6 +687,24 @@ patchset was cherry picked to change ..." message.
In this case, it makes more sense for the message to say "Uploaded
patch set N" instead.
* Make links appear with consistent colors.
* Prevent duplicate permitted_labels from being shown in labels list.
Diff Screens
^^^^^^^^^^^^
* link:https://code.google.com/p/gerrit/issues/detail?id=1233[Issue 1233]:
Prevent expansion when whole file isn't loaded.
* link:https://code.google.com/p/gerrit/issues/detail?id=2122[Issue 2122]:
Show review comments for unchanged files.
+
When comparing patch sets and some comment was put in one side,
that comment was not shown if there was no code changed between
the two patch sets
Project Screens
^^^^^^^^^^^^^^^
@ -708,6 +778,8 @@ was never used.
The API is simplified in the sense that one Event now corresponds to
one ref update only.
* Make plugin servlet's context path authorization aware.
Review Notes
^^^^^^^^^^^^
@ -723,6 +795,8 @@ Fix note creation when the same commit exists in another Git repository.
* Create review note also when newObjectId already present in another branch.
* Correct documentation of the export command.
Emails
~~~~~~
@ -751,6 +825,9 @@ project configuration] is added.
* Various spelling mistakes are corrected in the documentation and previous
release notes.
* link:https://code.google.com/p/gerrit/issues/detail?id=2144[Issue 2144]:
Documentation of the query operator is fixed.
Upgrades
--------
@ -762,6 +839,9 @@ Upgrades
* Update H2 to 1.3.173
* Update bouncycastle to 1.44
* Update Apache Mina to 2.0.7
* Update Apache SSHD to 0.9.0.201311081
* link:https://code.google.com/p/gerrit/issues/detail?id=2232[Issue 2232]:
Update Apache SSHD to 0.9.0.201311081
* asciidoctor 0.1.4 is now required to build the documentation
* jsr305 library was removed
* link:https://code.google.com/p/gerrit/issues/detail?id=2232[Issue 2232]:
Update Jsch to 1.5.0

View File

@ -30,12 +30,17 @@ public class DefaultFileExtensionRegistry extends MimeDetector {
private static final MimeType INI = newMimeType("text/x-ini", 2);
private static final MimeType PYTHON = newMimeType("text/x-python", 2);
private static final ImmutableMap<String, MimeType> TYPES = ImmutableMap.of(
".gitmodules", INI,
"project.config", INI,
"BUCK", PYTHON,
"defs", newMimeType(PYTHON.toString(), 1),
"go", newMimeType("text/x-go", 1));
private static final ImmutableMap<String, MimeType> TYPES =
ImmutableMap.<String,MimeType>builder()
.put(".gitmodules", INI)
.put("project.config", INI)
.put("BUCK", PYTHON)
.put("defs", newMimeType(PYTHON.toString(), 1))
.put("py", newMimeType(PYTHON.toString(), 1))
.put("go", newMimeType("text/x-go", 1))
.put("cxx", newMimeType("text/x-c++src", 1))
.put("hxx", newMimeType("text/x-c++hdr", 1))
.build();
private static MimeType newMimeType(String type, final int specificity) {
return new MimeType(type) {

View File

@ -365,8 +365,7 @@ public class PatchSetInserter {
public static ChangeKind getChangeKind(MergeUtil.Factory mergeUtilFactory, ProjectState project,
Repository git, RevCommit prior, RevCommit next) {
if (!next.getFullMessage().equals(prior.getFullMessage())) {
if (next.getTree() == prior.getTree()
&& prior.getParent(0).equals(next.getParent(0))) {
if (next.getTree() == prior.getTree() && isSameParents(prior, next)) {
return ChangeKind.NO_CODE_CHANGE;
} else {
return ChangeKind.REWORK;
@ -379,7 +378,7 @@ public class PatchSetInserter {
}
if (next.getTree() == prior.getTree() &&
prior.getParent(0).equals(next.getParent(0))) {
isSameParents(prior, next)) {
return ChangeKind.TRIVIAL_REBASE;
}
@ -404,6 +403,15 @@ public class PatchSetInserter {
}
}
private static boolean isSameParents(RevCommit prior, RevCommit next) {
if (prior.getParentCount() != next.getParentCount()) {
return false;
} else if (prior.getParentCount() == 0) {
return true;
}
return prior.getParent(0).equals(next.getParent(0));
}
public class ChangeModifiedException extends InvalidChangeOperationException {
private static final long serialVersionUID = 1L;