Merge branch 'stable-2.5'
* stable-2.5:
Describe submit filter in the prolog-cookbook.
Write a Cookbook for Prolog submit rules
Fix message if pushing tag is rejected because tagger is somebody else
Make commands to download patch sets configurable
Show dependency list when change is needed by a draft change
Create a draft patch set when a draft patch set is rebased
Allow users of ChangeTable to control styling of change rows
Fix displaying of file diff if draft patch has been deleted
set-account command: Do not close ReviewDb that was injected
Update HTTP password from SSH commands.
diff --git a/Documentation/access-control.txt b/Documentation/access-control.txt
index 879d1ac..1c00de3 100644
--- a/Documentation/access-control.txt
+++ b/Documentation/access-control.txt
@@ -728,6 +728,20 @@
can still do the rebase locally and upload the rebased commit as a new
patch set.
+[[category_remove_reviewer]]
+Remove Reviewer
+~~~~~~~~~~~~~~~
+
+This category permits users to remove other users from the list of
+reviewers on a change.
+
+The change owner, project owner and site administrator can always
+remove reviewers (even without having the `Remove Reviewer` access
+right assigned).
+
+Users without this access right can only remove themselves from the
+reviewer list on a change.
+
[[category_submit]]
Submit
diff --git a/Documentation/dev-release-deploy-config.txt b/Documentation/dev-release-deploy-config.txt
new file mode 100644
index 0000000..bc52d50
--- /dev/null
+++ b/Documentation/dev-release-deploy-config.txt
@@ -0,0 +1,135 @@
+Deploy Gerrit Artifacts
+=======================
+
+Gerrit Artifacts are stored on
+link:https://developers.google.com/storage/[Google Cloud Storage].
+Via the link:https://code.google.com/apis/console/[API Console] the
+Gerrit maintainers have access to the `Gerrit Code Review` project.
+This projects host several buckets for storing Gerrit artifacts:
+
+* `gerrit-api`:
++
+Bucket to store the Gerrit Extension API Jar and the Gerrit Plugin API
+Jar.
+
+* `gerrit-maven`:
++
+Bucket to store Gerrit Subproject Artifacts (e.g. `gwtexpui`,
+`gwtjsonrpc` etc.).
+
+* `gerrit-plugins`:
++
+Bucket to store Gerrit Core Plugin Artifacts.
+
+[[deploy-configuration-settings-xml]]
+Deploy Configuration in Maven `settings.xml`
+--------------------------------------------
+
+To upload artifacts to a bucket the user must authenticate with a
+username and password. The username and password need to be retrieved
+from the link:https://code.google.com/apis/console/[API Console]:
+
+* Go to the `Gerrit Code Review` project
+* In the menu on the left select `Google Cloud Storage` >
+`Interoperable Access`
+* Use the `Access Key` as username
+* Click under `Secret` on the `Show` button to find the password
+
+To make the username and password known to Maven, they must be
+configured in the `~/.m2/settings.xml` file.
+
+----
+ <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <servers>
+ <server>
+ <id>gerrit-api-repository</id>
+ <username>GOOG..EXAMPLE.....EXAMPLE</username>
+ <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
+ </server>
+ <server>
+ <id>gerrit-maven-repository</id>
+ <username>GOOG..EXAMPLE.....EXAMPLE</username>
+ <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
+ </server>
+ <server>
+ <id>gerrit-plugins-repository</id>
+ <username>GOOG..EXAMPLE.....EXAMPLE</username>
+ <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
+ </server>
+ </servers>
+ </settings>
+----
+
+[[deploy-configuration-subprojects]]
+Gerrit Subprojects
+~~~~~~~~~~~~~~~~~~
+
+* You will need to have the following in the `pom.xml` to make it
+deployable to the `gerrit-maven` storage bucket:
+
+----
+ <distributionManagement>
+ <repository>
+ <id>gerrit-maven-repository</id>
+ <name>Gerrit Maven Repository</name>
+ <url>s3://gerrit-maven@commondatastorage.googleapis.com</url>
+ <uniqueVersion>true</uniqueVersion>
+ </repository>
+ </distributionManagement>
+----
+
+
+* Add this to the `pom.xml` to enable the wagon provider:
+
+----
+ <build>
+ <extensions>
+ <extension>
+ <groupId>net.anzix.aws</groupId>
+ <artifactId>s3-maven-wagon</artifactId>
+ <version>3.2</version>
+ </extension>
+ </extensions>
+ </build>
+----
+
+
+[[deploy-configuration-core-plugins]]
+Gerrit Core Plugins
+~~~~~~~~~~~~~~~~~~~
+
+* You will need to have the following in the `pom.xml` to make it
+deployable to the `gerrit-plugins` storage bucket:
+
+----
+ <distributionManagement>
+ <repository>
+ <id>gerrit-plugins-repository</id>
+ <name>Gerrit Plugins Repository</name>
+ <url>s3://gerrit-plugins@commondatastorage.googleapis.com</url>
+ <uniqueVersion>true</uniqueVersion>
+ </repository>
+ </distributionManagement>
+----
+
+
+* Add this to the `pom.xml` to enable the wagon provider:
+
+----
+ <build>
+ <extensions>
+ <extension>
+ <groupId>net.anzix.aws</groupId>
+ <artifactId>s3-maven-wagon</artifactId>
+ <version>3.2</version>
+ </extension>
+ </extensions>
+ </build>
+----
+
+
+GERRIT
+------
+Part of link:index.html[Gerrit Code Review]
diff --git a/Documentation/dev-release-subproject.txt b/Documentation/dev-release-subproject.txt
index 799ff2d..5e3770d 100644
--- a/Documentation/dev-release-subproject.txt
+++ b/Documentation/dev-release-subproject.txt
@@ -1,96 +1,106 @@
Making a Release of a Gerrit Subproject / Core Plugin
=====================================================
-Preparing a New Snapshot for Publishing
----------------------------------------
+[[make-snapshot]]
+Make a Snapshot
+---------------
-* You will need to have the following in the `pom.xml` to make it
- deployable to the `gerrit-maven` storage bucket:
+* Only for plugins:
+** In the `pom.xml` update the Gerrit version under `properties` >
+`Gerrit-ApiVersion` to the version of the new Gerrit
+release.
+** Make sure that the URL for the Maven repository with the id
+`gerrit-api-repository` in the `pom.xml` is correct.
++
+If `Gerrit-ApiVersion` references a released Gerrit version it must be
+`https://gerrit-api.commondatastorage.googleapis.com/release/`, if
+`Gerrit-ApiVersion` references a snapshot Gerrit version it must be
+`https://gerrit-api.commondatastorage.googleapis.com/snapshot/`.
-----
- <distributionManagement>
- <repository>
- <id>gerrit-maven</id>
- <name>gerrit Maven Repository</name>
- <url>s3://gerrit-maven@commondatastorage.googleapis.com</url>
- <uniqueVersion>true</uniqueVersion>
- </repository>
- </distributionManagement>
-----
+* Build the latest snapshot and install it into the local Maven
+repository:
++
+====
+ mvn clean install
+====
+
+* Test Gerrit with this snapshot locally
-* Add this to the `pom.xml` to enable the wagon provider:
+Publish Snapshot
+----------------
-----
- <build>
- <extensions>
- <extension>
- <groupId>net.anzix.aws</groupId>
- <artifactId>s3-maven-wagon</artifactId>
- <version>3.2</version>
- </extension>
- </extensions>
- </build>
-----
+If a Snapshot for a Subproject was created that should be referenced by
+Gerrit while current Gerrit development is ongoing, this Snapshot needs
+to be published.
+* Make sure you have done the configuration needed for deployment:
+** link:dev-release-deploy-config.html#deploy-configuration-settings-xml[
+Configuration in Maven `settings.xml`]
+** link:dev-release-deploy-config.html#deploy-configuration-subprojects[
+Configuration for Subprojects in `pom.xml`]
-* Add your username and password to your `~/.m2/settings.xml` file.
- These need to come from the link:https://code.google.com/apis/console/[API Console].
-
-----
- <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
- <servers>
- <server>
- <id>gerrit-maven</id>
- <username>GOOG..EXAMPLE.....EXAMPLE</username>
- <password>EXAMPLE..EXAMPLE..EXAMPLE</password>
- </server>
- </servers>
- </settings>
-----
-
-
-Making a Snapshot
------------------
-
-* Only for plugins: in the `pom.xml` update the Gerrit version under
-`properties` > `Gerrit-ApiVersion` to the version of the new Gerrit
-release
-* First build and deploy the latest snapshot and ensure that Gerrit
-builds/runs with this snapshot
-
-* Deploy the snapshot:
-
+* Deploy the new snapshot:
++
====
mvn deploy
====
+* Change the version in the Gerrit parent `pom.xml` for the Subproject
+to the `SNAPSHOT` version
++
+When Gerrit gets released, a release of the Subproject has to be done
+and Gerrit has to reference the released Subproject version.
-Making a Release
-----------------
-* First deploy (and test) the latest snapshot for the subproject/plugin
+[[prepare-release]]
+Prepare the Release
+-------------------
+
+* link:#make-snapshot[First create (and test) the latest snapshot for
+the subproject/plugin]
* Update the top level `pom.xml` in the subproject/plugin to reflect
the new project version (the exact value of the tag you will create
below)
-* Commit the pom change and push to the project's repo
-`refs/for/<master/stable>`
-
-* Tag the version you just pushed (and push the tag)
-
+* Create the Release Tag
++
====
git tag -a -m "prolog-cafe 1.3" v1.3
- git push gerrit-review refs/tags/v1.3:refs/tags/v1.3
====
+* Build and install into local Maven repository:
++
+====
+ mvn clean install
+====
+
+
+[[publish-release]]
+Publish the Release
+-------------------
+
+* Make sure you have done the configuration needed for deployment:
+** link:dev-release-deploy-config.html#deploy-configuration-settings-xml[
+Configuration in Maven `settings.xml`]
+** Configuration in `pom.xml` for
+link:dev-release-deploy-config.html#deploy-configuration-subprojects[Subprojects] or
+link:dev-release-deploy-config.html#deploy-configuration-core-plugins[Core Plugins]
+
* Deploy the new release:
-
++
====
- mvn deploy
+ mvn deploy
+====
+
+* Push the pom change(s) to the project's repository
+`refs/for/<master|stable>`
+
+* Push the Release Tag
++
+====
+ git push gerrit-review refs/tags/v1.3:refs/tags/v1.3
====
diff --git a/Documentation/dev-release.txt b/Documentation/dev-release.txt
index 5ea3042..7a963fc 100644
--- a/Documentation/dev-release.txt
+++ b/Documentation/dev-release.txt
@@ -11,7 +11,7 @@
To make a Gerrit release involves a great deal of complex
tasks and it is easy to miss a step so this document should
-hopefuly serve as both a how to for those new to the process
+hopefully serve as both a how to for those new to the process
and as a checklist for those already familiar with these
tasks.
@@ -20,106 +20,181 @@
-------------------
Here are some guidelines on release approaches depending on the
-type of release you want to make (stable-fix, stable, RC0, RC1...).
+type of release you want to make (`stable-fix`, `stable`, `RC0`,
+`RC1`...).
Stable
~~~~~~
-A stable release is generally built from the master branch and may need to
-undergo some stabilization before releasing the final release.
+A `stable` release is generally built from the `master` branch and may
+need to undergo some stabilization before releasing the final release.
* Propose the release with any plans/objectives to the mailing list
-* Create a Gerrit RC0
+* Create a Gerrit `RC0`
-* If needed create a Gerrit RC1
+* If needed create a Gerrit `RC1`
[NOTE]
========================================================================
You may let in a few features to this release
========================================================================
-* If needed create a Gerrit RC2
+* If needed create a Gerrit `RC2`
[NOTE]
========================================================================
There should be no new features in this release, only bug fixes
========================================================================
-* Finally create the stable release (no RC)
+* Finally create the `stable` release (no `RC`)
Stable-Fix
~~~~~~~~~~
-Stable-fix releases should likely only contain bug fixes and doc updates.
+`stable-fix` releases should likely only contain bug fixes and doc
+updates.
-* Propose the release with any plans/objectives to the mailing list
-
-* This type of release does not need any RCs, release when the objectives
- are met
-
+* This type of release does not need any RCs, release when the
+objectives are met
Create the Actual Release
---------------------------
-In the example commands below we assume that the last release was '2.4' and that
-we are preparing '2.5' release.
+To create a Gerrit release the following steps have to be done:
-Prepare the Subprojects
-~~~~~~~~~~~~~~~~~~~~~~~
-
-* Publish the latest snapshot for all subprojects
-* Freeze all subprojects and link:dev-release-subproject.html[publish]
- them!
+. link:#subproject[Release Subprojects]
+. link:#prepare-gerrit[Prepare the Gerrit Release]
+.. link:#prepare-war-and-plugin-api[Prepare the Gerrit WAR and the Plugin API Jar]
+.. link:#prepare-core-plugins[Prepare the Core Plugins]
+.. link:#prepare-war-with-plugins[Prepare Gerrit WAR with Core Plugins]
+. link:#publish-gerrit[Publish the Gerrit Release]
+.. link:#extension-and-plugin-api[Publish the Extension and Plugin API Jars]
+.. link:#publish-core-plugins[Publish the Core Plugins]
+.. link:#publish-gerrit-war[Publish the Gerrit WAR (with Core Plugins)]
+.. link:#push-stable[Push the Stable Branch]
+.. link:#push-tag[Push the Release Tag]
+.. link:#upload-documentation[Upload the Documentation]
+.. link:#update-issues[Update the Issues]
+.. link:#announce[Announce on Mailing List]
+. link:#increase-version[Increase Gerrit Version for Current Development]
+. link:#merge-stable[Merge `stable` into `master`]
+[[subproject]]
+Release Subprojects
+~~~~~~~~~~~~~~~~~~~
+
+The subprojects to be released are:
+
+* `gwtexpui`
+* `gwtjsonrpc`
+* `gwtorm`
+* `prolog-cafe`
+
+For each subproject do:
+
+* Check the dependency to the Subproject in the Gerrit parent `pom.xml`:
++
+If a `SNAPSHOT` version of the subproject is referenced the subproject
+needs to be released so that Gerrit can reference a released version of
+the subproject.
+
+* link:dev-release-subproject.html#make-snapshot[Make a snapshot and test it]
+* link:dev-release-subproject.html#prepare-release[Prepare the Release]
+* link:dev-release-subproject.html#publish-release[Publish the Release]
+
+* Update the version of the Subproject in the Gerrit parent `pom.xml`
+to the released version
+
+
+[[prepare-gerrit]]
Prepare Gerrit
~~~~~~~~~~~~~~
-* Create a `stable-2.5` branch for making the new release
+In all example commands it is assumed that the last release was `2.4`
+and that now the `2.5` release is prepared.
-* In the `master` branch: Update the poms for the Gerrit version, push for
-review, get merged
-====
- tools/version.sh --snapshot=2.5
-====
+[[prepare-war-and-plugin-api]]
+Prepare the Gerrit WAR and the Plugin API Jar
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-* Checkout the `stable-2.5` branch
-* Update the top level `pom.xml` in Gerrit to ensure that none of the
-Subprojects point to snapshot releases
+* Create locally a `stable-2.5` branch for making the new release
-* Tag
+* Check in the Gerrit parent `pom.xml` that no `SNAPSHOT` version of a
+Subproject is referenced
++
+If there is a dependency to a `SNAPSHOT` version,
+link:#subproject[release the subproject] first.
+* Create a tag for the Gerrit release
++
+For an `RC` release:
++
====
git tag -a -m "gerrit 2.5-rc0" v2.5-rc0
+====
++
+For a final `stable` release:
++
+====
git tag -a -m "gerrit 2.5" v2.5
====
-* Build (without plugins)
-
+* Build the Gerrit WAR (without plugins) and the Plugin API Jar
++
====
./tools/release.sh
====
++
+[WARNING]
+========================================================================
+Make sure you are compiling the release for all browsers. Check in your
+Maven `~/.m2/settings.xml` file that no Maven profile is active that
+limits the compilation to a certain browser.
+========================================================================
-[[plugin-api]]
-Publish the Plugin API JAR File
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Sanity check WAR
-* Push JAR to `commondatastorage.googleapis.com`
-** Run `tools/deploy_api.sh`
-Prepare the Core Plugins
-~~~~~~~~~~~~~~~~~~~~~~~~
-* link:dev-release-subproject.html[Release and publish] the core plugins
+[[prepare-core-plugins]]
+Prepare Core Plugins
+^^^^^^^^^^^^^^^^^^^^
+The core plugins to be prepared are:
-Package Gerrit with Plugins
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-* Ensure that the core plugins listed in `gerrit-package-plugins/pom.xml`
-point to the latest release version (no dependency to snapshot versions)
+* `plugins/replication`
+
+For each core plugin do:
+
+* link:dev-release-subproject.html#make-snapshot[Make a snapshot and test it]
+* link:dev-release-subproject.html#prepare-release[Prepare the Release]
+
+* Update the version of the Core Plugin in
+`gerrit-package-plugins/pom.xml` to the released version
+
+[WARNING]
+========================================================================
+Updating the plugin versions in `gerrit-package-plugins/pom.xml`
+invalidates the Gerrit Release Tag which was created before.
+
+If needed delete the tag and recreate it!
+========================================================================
+
+
+[[prepare-war-with-plugins]]
+Prepare Gerrit WAR with Core Plugins
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* Ensure that the Core Plugins listed in `gerrit-package-plugins/pom.xml`
+point to the latest release version (no dependency to `SNAPSHOT` versions)
+
+* Ensure that the release tag points to the `HEAD` commit
+
* Include core plugins into WAR
++
====
$ ./tools/version.sh --release && mvn clean package -f gerrit-package-plugins/pom.xml
$ ./tools/version.sh --reset
@@ -127,35 +202,91 @@
* Find WAR that includes the core plugins at
`gerrit-package-plugins\target\gerrit-full-v2.5.war`
-* Sanity check WAR
-Publish to the Project Locations
---------------------------------
+* Compare `gerrit-package-plugins\target\gerrit-full-v2.5.war` with
+ `gerrit-war\target\gerrit-v2.5.war`
++
+The only difference should be the core plugins jars under
+`WEB-INF\plugins`.
-WAR File
-~~~~~~~~
+* Test the new Gerrit version
-* Upload WAR to code.google.com/p/gerrit (manual web browser)
+[[publish-gerrit]]
+Publish the Gerrit Release
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+
+[[extension-and-plugin-api]]
+Publish the Extension and Plugin API Jars
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* Make sure you have done the
+link:dev-release-deploy-config.html#deploy-configuration-settings-xml[
+configuration needed for deployment]
+
+* Push the Jars to `commondatastorage.googleapis.com`:
++
+----
+ ./tools/deploy_api.sh
+----
+
+
+[[publish-core-plugins]]
+Publish the Core Plugins
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+* link:dev-release-subproject.html#publish-release[Publish the Release]
+
+
+[[publish-gerrit-war]]
+Publish the Gerrit WAR (with Core Plugins)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+* The WAR file to upload is `gerrit-package-plugins\target\gerrit-full-v2.5.war`
+* Upload WAR to `code.google.com/p/gerrit` (manual via web browser)
** Go to http://code.google.com/p/gerrit/downloads/list
-** Use the "New Download" button
+** Use the `New Download` button
* Update labels:
-** new war: [release-candidate], featured...
-** old war: deprecated
+** new war: [`release-candidate`], `featured`...
+** old war: `deprecated`
-Tag
-~~~
-* Push the New Tag
+[[push-stable]]
+Push the Stable Branch
+^^^^^^^^^^^^^^^^^^^^^^
+* create the stable branch `stable-2.5` in the `gerrit` project
++
+Via the link:https://gerrit-review.googlesource.com/#/admin/projects/gerrit,branches[
+Gerrit WebUI] or by push.
+
+* Push the commits done on `stable-2.5` to `refs/for/stable-2.5` and
+get them merged
+
+
+[[push-tag]]
+Push the Release Tag
+^^^^^^^^^^^^^^^^^^^^
+
+* Push the new Release Tag
++
+For an `RC`:
++
====
git push gerrit-review refs/tags/v2.5-rc0:refs/tags/v2.5-rc0
+====
++
+For a final `stable` release:
++
+====
git push gerrit-review refs/tags/v2.5:refs/tags/v2.5
====
-Docs
-~~~~
+[[upload-documentation]]
+Upload the Documentation
+^^^^^^^^^^^^^^^^^^^^^^^^
====
make -C Documentation PRIOR=2.4 update
@@ -167,14 +298,14 @@
* Update Google Code project links
** Go to http://code.google.com/p/gerrit/admin
** Point the main page to the new docs. The link to the documentation has to be
-updated at two places: in the project description and also in the Links
+updated at two places: in the project description and also in the `Links`
section.
** Point the main page to the new release notes
[NOTE]
========================================================================
-The docs makefile does an svn cp of the prior revision of the docs to branch
-the docs so you have less to upload on the new docs.
+The docs makefile does an `svn cp` of the prior revision of the docs to
+branch the docs so you have less to upload on the new docs.
User and password from here:
@@ -188,30 +319,33 @@
========================================================================
-Issues
-~~~~~~
+[[update-issues]]
+Update the Issues
+^^^^^^^^^^^^^^^^^
====
How do the issues get updated? Do you run a script to do
- this? When do you do it, after the final 2.2.2 is released?
+ this? When do you do it, after the final 2.5 is released?
====
By hand.
-Our current process is an issue should be updated to say Status =
-Submitted, FixedIn-2.2.2 once the change is submitted, but before the
+Our current process is an issue should be updated to say `Status =
+Submitted, FixedIn-2.5` once the change is submitted, but before the
release.
After the release is actually made, you can search in Google Code for
-``Status=Submitted FixedIn=2.2.2'' and then batch update these changes
-to say Status=Released. Make sure the pulldown says ``All Issues''
-because Status=Submitted is considered a closed issue.
+``Status=Submitted FixedIn=2.5'' and then batch update these changes
+to say `Status=Released`. Make sure the pulldown says ``All Issues''
+because `Status=Submitted` is considered a closed issue.
-Mailing List
-~~~~~~~~~~~~
+[[announce]]
+Announce on Mailing List
+^^^^^^^^^^^^^^^^^^^^^^^^
-* Send an email to the mailing list to announce the release, consider including some or all of the following in the email:
+* Send an email to the mailing list to announce the release, consider
+including some or all of the following in the email:
** A link to the release and the release notes (if a final release)
** A link to the docs
** Describe the type of release (stable, bug fix, RC)
@@ -241,7 +375,7 @@
-Martin
----
-* Add an entry to the NEWS section of the main Gerrit project web page
+* Add an entry to the `NEWS` section of the main Gerrit project web page
** Go to: http://code.google.com/p/gerrit/admin
** Add entry like:
----
@@ -252,18 +386,33 @@
** Go to: http://groups.google.com/group/repo-discuss/topics
** Click on the announcement thread
** Near the top right, click on options
-** Under options, cick the "Display this top first" checkbox
+** Under options, click the "Display this top first" checkbox
** and Save
* Update the previous discussion group announcement to no longer be sticky
** See above (unclick checkbox)
-Merging Stable Fixes to master
-------------------------------
+[[increase-version]]
+Increase Gerrit Version for Current Development
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-After every stable-fix release, stable should be merged to master to
-ensure that none of the fixes ever get lost.
+All new development that is done in the `master` branch will be
+included in the next Gerrit release. Update the Gerrit version in each
+`pom.xml` file to the next `SNAPSHOT`version. Push the change for
+review and get it merged.
+
+====
+ tools/version.sh --snapshot=2.6
+====
+
+
+[[merge-stable]]
+Merge `stable` into `master`
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+After every release, stable should be merged to master to ensure that
+none of the changes/fixes ever get lost.
====
git config merge.summary true
diff --git a/ReleaseNotes/ReleaseNotes-2.0.21.txt b/ReleaseNotes/ReleaseNotes-2.0.21.txt
index 7dd9ef4..47ba654 100644
--- a/ReleaseNotes/ReleaseNotes-2.0.21.txt
+++ b/ReleaseNotes/ReleaseNotes-2.0.21.txt
@@ -201,7 +201,7 @@
Gerrit no longer forges the From header in notification emails.
To enable the prior forging behavior, set `sendemail.from`
to `USER` in gerrit.config. For more details see
-[http://gerrit.googlecode.com/svn/documentation/2.0/config-gerrit.html#sendemail.from sendemail.from]
+link:http://gerrit.googlecode.com/svn/documentation/2.0/config-gerrit.html#sendemail.from[sendemail.from]
Bug Fixes
---------
diff --git a/ReleaseNotes/ReleaseNotes-2.0.24.txt b/ReleaseNotes/ReleaseNotes-2.0.24.txt
index 9481a3a..7e0a617 100644
--- a/ReleaseNotes/ReleaseNotes-2.0.24.txt
+++ b/ReleaseNotes/ReleaseNotes-2.0.24.txt
@@ -67,7 +67,7 @@
* issue 300 Support SMTP over SSL/TLS
+
Encrypted SMTP is now supported natively within Gerrit, see
-[http://gerrit.googlecode.com/svn/documentation/2.0/config-gerrit.html#sendemail.smtpEncryption sendemail.smtpEncryption]
+link:http://gerrit.googlecode.com/svn/documentation/2.0/config-gerrit.html#sendemail.smtpEncryption[sendemail.smtpEncryption]
Bug Fixes
---------
diff --git a/gerrit-antlr/pom.xml b/gerrit-antlr/pom.xml
index 34cb46f..314d8d2 100644
--- a/gerrit-antlr/pom.xml
+++ b/gerrit-antlr/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-antlr</artifactId>
diff --git a/gerrit-cache-h2/pom.xml b/gerrit-cache-h2/pom.xml
index 4d4303c..1a26b21 100644
--- a/gerrit-cache-h2/pom.xml
+++ b/gerrit-cache-h2/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-cache-h2</artifactId>
diff --git a/gerrit-common/pom.xml b/gerrit-common/pom.xml
index 9b3fe5f..1db3549 100644
--- a/gerrit-common/pom.xml
+++ b/gerrit-common/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-common</artifactId>
@@ -61,6 +61,11 @@
<artifactId>gerrit-patch-jgit</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/ApprovalDetail.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/ApprovalDetail.java
index 3d438f2..05e86be 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/ApprovalDetail.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/ApprovalDetail.java
@@ -42,6 +42,7 @@
protected Account.Id account;
protected List<PatchSetApproval> approvals;
protected boolean canRemove;
+ private Set<String> votable;
private transient Set<String> approved;
private transient Set<String> rejected;
@@ -112,6 +113,13 @@
rejected.add(label);
}
+ public void votable(String label) {
+ if (votable == null) {
+ votable = new HashSet<String>();
+ }
+ votable.add(label);
+ }
+
public boolean isApproved(String label) {
return approved != null && approved.contains(label);
}
@@ -119,4 +127,8 @@
public boolean isRejected(String label) {
return rejected != null && rejected.contains(label);
}
+
+ public boolean canVote(String label) {
+ return votable != null && votable.contains(label);
+ }
}
diff --git a/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java b/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
index 5cb7787..29d9431 100644
--- a/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
+++ b/gerrit-common/src/main/java/com/google/gerrit/common/data/Permission.java
@@ -33,6 +33,7 @@
public static final String PUSH_TAG = "pushTag";
public static final String READ = "read";
public static final String REBASE = "rebase";
+ public static final String REMOVE_REVIEWER = "removeReviewer";
public static final String SUBMIT = "submit";
private static final List<String> NAMES_LC;
@@ -52,6 +53,7 @@
NAMES_LC.add(PUSH_TAG.toLowerCase());
NAMES_LC.add(LABEL.toLowerCase());
NAMES_LC.add(REBASE.toLowerCase());
+ NAMES_LC.add(REMOVE_REVIEWER.toLowerCase());
NAMES_LC.add(SUBMIT.toLowerCase());
labelIndex = NAMES_LC.indexOf(Permission.LABEL);
diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml
index ff672d5..1080ed1 100644
--- a/gerrit-extension-api/pom.xml
+++ b/gerrit-extension-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-extension-api</artifactId>
diff --git a/gerrit-gwtdebug/pom.xml b/gerrit-gwtdebug/pom.xml
index 01b93a6..7437174 100644
--- a/gerrit-gwtdebug/pom.xml
+++ b/gerrit-gwtdebug/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-gwtdebug</artifactId>
diff --git a/gerrit-gwtui/pom.xml b/gerrit-gwtui/pom.xml
index b3291d1..f31d6f1 100644
--- a/gerrit-gwtui/pom.xml
+++ b/gerrit-gwtui/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-gwtui</artifactId>
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.java
index ced2202..dbf9973 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.java
@@ -106,4 +106,6 @@
String projectAccessError();
String projectAccessProposeForReviewHint();
+
+ String userCannotVoteToolTip();
}
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.properties
index e2d048b..41dc06b 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritConstants.properties
@@ -89,3 +89,5 @@
projectAccessError = You don't have permissions to modify the access rights for the following refs:
projectAccessProposeForReviewHint = You may propose these modifications to the project owners by clicking on 'Save for Review'.
+
+userCannotVoteToolTip = User cannot vote in this category
\ No newline at end of file
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritCss.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritCss.java
index 9cbf5cd..a01e271 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritCss.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritCss.java
@@ -37,6 +37,7 @@
String approvalhint();
String approvalrole();
String approvalscore();
+ String notVotable();
String blockHeader();
String bottomheader();
String cAPPROVAL();
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/RegisterScreen.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/RegisterScreen.java
index 084ea6f..2810931 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/RegisterScreen.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/RegisterScreen.java
@@ -125,7 +125,7 @@
agreementGroup.add(whyAgreement);
choices.add(new InlineHyperlink(Util.C.newAgreement(),
- PageLinks.SETTINGS_NEW_AGREEMENT + "," + nextToken));
+ PageLinks.SETTINGS_NEW_AGREEMENT));
choices
.add(new InlineHyperlink(Util.C.welcomeAgreementLater(), nextToken));
formBody.add(agreementGroup);
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
index 0743fbd..47bcea6 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
@@ -114,6 +114,7 @@
pushTag, \
read, \
rebase, \
+ removeReviewer, \
submit
abandon = Abandon
create = Create Reference
@@ -126,6 +127,7 @@
pushTag = Push Annotated Tag
read = Read
rebase = Rebase
+removeReviewer = Remove Reviewer
submit = Submit
refErrorEmpty = Reference must be supplied
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java
index 73036ff..8a85364 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ApprovalTable.java
@@ -397,8 +397,11 @@
for (String labelName : columns) {
fmt.setStyleName(row, col, Gerrit.RESOURCES.css().approvalscore());
+ if (!ad.canVote(labelName)) {
+ fmt.addStyleName(row, col, Gerrit.RESOURCES.css().notVotable());
+ fmt.getElement(row, col).setTitle(Gerrit.C.userCannotVoteToolTip());
- if (ad.isRejected(labelName)) {
+ } else if (ad.isRejected(labelName)) {
table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
} else if (ad.isApproved(labelName)) {
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css b/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
index 7512d8c..b21f813 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/gerrit.css
@@ -37,7 +37,7 @@
@def black #000000;
@def white #ffffff;
@def norm-font Arial Unicode MS, Arial, sans-serif;
-@def mono-font 'Lucida Console', 'Lucida Sans Typewriter', Monaco, monospace;
+@def mono-font monospace;
@eval backgroundColor com.google.gerrit.client.Gerrit.getTheme().backgroundColor;
@eval topMenuColor com.google.gerrit.client.Gerrit.getTheme().topMenuColor;
@@ -871,6 +871,9 @@
.infoTable td.approvalscore {
text-align: center;
}
+.infoTable td.notVotable {
+ background: #F5F5F5;
+}
.infoTable td.negscore {
color: red;
}
diff --git a/gerrit-httpd/pom.xml b/gerrit-httpd/pom.xml
index ceacb66..65641aa 100644
--- a/gerrit-httpd/pom.xml
+++ b/gerrit-httpd/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-httpd</artifactId>
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java
index 6660a3d..0a934e1 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/ChangeDetailFactory.java
@@ -19,6 +19,7 @@
import com.google.gerrit.common.data.ApprovalTypes;
import com.google.gerrit.common.data.ChangeDetail;
import com.google.gerrit.common.data.ChangeInfo;
+import com.google.gerrit.common.data.PermissionRange;
import com.google.gerrit.common.data.SubmitRecord;
import com.google.gerrit.common.errors.NoSuchEntityException;
import com.google.gerrit.httpd.rpc.Handler;
@@ -71,6 +72,8 @@
private final ApprovalTypes approvalTypes;
private final ChangeControl.Factory changeControlFactory;
+ private final ChangeControl.GenericFactory changeControlGenericFactory;
+ private final IdentifiedUser.GenericFactory identifiedUserFactory;
private final FunctionState.Factory functionState;
private final PatchSetDetailFactory.Factory patchSetDetail;
private final AccountInfoCacheFactory aic;
@@ -93,6 +96,8 @@
final PatchSetDetailFactory.Factory patchSetDetail, final ReviewDb db,
final GitRepositoryManager repoManager,
final ChangeControl.Factory changeControlFactory,
+ final ChangeControl.GenericFactory changeControlGenericFactory,
+ final IdentifiedUser.GenericFactory identifiedUserFactory,
final AccountInfoCacheFactory.Factory accountInfoCacheFactory,
final AnonymousUser anonymousUser,
final MergeOp.Factory opFactory,
@@ -104,6 +109,8 @@
this.db = db;
this.repoManager = repoManager;
this.changeControlFactory = changeControlFactory;
+ this.changeControlGenericFactory = changeControlGenericFactory;
+ this.identifiedUserFactory = identifiedUserFactory;
this.anonymousUser = anonymousUser;
this.aic = accountInfoCacheFactory.create();
@@ -241,6 +248,14 @@
if (ca.getPatchSetId().equals(psId)) {
d.add(ca);
}
+ final ChangeControl chgCtrl =
+ changeControlGenericFactory.controlFor(detail.getChange(),
+ identifiedUserFactory.create(ca.getAccountId()));
+ for (PermissionRange pr : chgCtrl.getLabelRanges()) {
+ if (pr.getMin() != 0 || pr.getMax() != 0) {
+ d.votable(pr.getLabel());
+ }
+ }
}
final Account.Id owner = detail.getChange().getOwner();
diff --git a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetPublishDetailFactory.java b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetPublishDetailFactory.java
index 50baf97..84d964a 100644
--- a/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetPublishDetailFactory.java
+++ b/gerrit-httpd/src/main/java/com/google/gerrit/httpd/rpc/changedetail/PatchSetPublishDetailFactory.java
@@ -55,6 +55,8 @@
private final ReviewDb db;
private final FunctionState.Factory functionState;
private final ChangeControl.Factory changeControlFactory;
+ private final ChangeControl.GenericFactory changeControlGenericFactory;
+ private final IdentifiedUser.GenericFactory identifiedUserFactory;
private final ApprovalTypes approvalTypes;
private final AccountInfoCacheFactory aic;
private final IdentifiedUser user;
@@ -71,12 +73,16 @@
final AccountInfoCacheFactory.Factory accountInfoCacheFactory,
final FunctionState.Factory functionState,
final ChangeControl.Factory changeControlFactory,
+ final ChangeControl.GenericFactory changeControlGenericFactory,
+ final IdentifiedUser.GenericFactory identifiedUserFactory,
final ApprovalTypes approvalTypes,
final IdentifiedUser user, @Assisted final PatchSet.Id patchSetId) {
this.infoFactory = infoFactory;
this.db = db;
this.functionState = functionState;
this.changeControlFactory = changeControlFactory;
+ this.changeControlGenericFactory = changeControlGenericFactory;
+ this.identifiedUserFactory = identifiedUserFactory;
this.approvalTypes = approvalTypes;
this.aic = accountInfoCacheFactory.create();
this.user = user;
@@ -190,7 +196,7 @@
}
private void loadApprovals(final PatchSetPublishDetail detail,
- final ChangeControl control) throws OrmException {
+ final ChangeControl control) throws OrmException, NoSuchChangeException {
final PatchSet.Id psId = detail.getChange().currentPatchSetId();
final Change.Id changeId = patchSetId.getParentKey();
final List<PatchSetApproval> allApprovals =
@@ -221,6 +227,14 @@
if (ca.getPatchSetId().equals(psId)) {
d.add(ca);
}
+ final ChangeControl chgCtrl =
+ changeControlGenericFactory.controlFor(detail.getChange(),
+ identifiedUserFactory.create(ca.getAccountId()));
+ for (PermissionRange pr : chgCtrl.getLabelRanges()) {
+ if (pr.getMin() != 0 || pr.getMax() != 0) {
+ d.votable(pr.getLabel());
+ }
+ }
}
final Account.Id owner = detail.getChange().getOwner();
diff --git a/gerrit-launcher/pom.xml b/gerrit-launcher/pom.xml
index e700351..4f33ce8 100644
--- a/gerrit-launcher/pom.xml
+++ b/gerrit-launcher/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-launcher</artifactId>
diff --git a/gerrit-main/pom.xml b/gerrit-main/pom.xml
index bb2d763..d174af1 100644
--- a/gerrit-main/pom.xml
+++ b/gerrit-main/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-main</artifactId>
diff --git a/gerrit-openid/pom.xml b/gerrit-openid/pom.xml
index fa4ab95..bb8b93d 100644
--- a/gerrit-openid/pom.xml
+++ b/gerrit-openid/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-openid</artifactId>
diff --git a/gerrit-package-plugins/pom.xml b/gerrit-package-plugins/pom.xml
index 562bf73..9f11bb3 100644
--- a/gerrit-package-plugins/pom.xml
+++ b/gerrit-package-plugins/pom.xml
@@ -22,7 +22,7 @@
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-package-plugins</artifactId>
<packaging>war</packaging>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
<name>Gerrit Code Review - Package Plugins</name>
<url>http://code.google.com/p/gerrit/</url>
diff --git a/gerrit-patch-commonsnet/pom.xml b/gerrit-patch-commonsnet/pom.xml
index f1a8b3e..78ca61c 100644
--- a/gerrit-patch-commonsnet/pom.xml
+++ b/gerrit-patch-commonsnet/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-patch-commonsnet</artifactId>
diff --git a/gerrit-patch-jgit/pom.xml b/gerrit-patch-jgit/pom.xml
index 65223fb..7e50af8 100644
--- a/gerrit-patch-jgit/pom.xml
+++ b/gerrit-patch-jgit/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-patch-jgit</artifactId>
diff --git a/gerrit-pgm/pom.xml b/gerrit-pgm/pom.xml
index a015219..5e25350 100644
--- a/gerrit-pgm/pom.xml
+++ b/gerrit-pgm/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-pgm</artifactId>
diff --git a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
index 3857ebd..f06bd32 100755
--- a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
+++ b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/gerrit.sh
@@ -126,7 +126,7 @@
GERRIT_INSTALL_TRACE_FILE=etc/gerrit.config
##################################################
-# No git in PATH? Needed for gerrit.confg parsing
+# No git in PATH? Needed for gerrit.config parsing
##################################################
if type git >/dev/null 2>&1 ; then
: OK
@@ -140,7 +140,17 @@
##################################################
if test -z "$GERRIT_SITE" ; then
GERRIT_SITE_1=`dirname "$0"`
+
+ ##################################################
+ # As last resort assume we started the script from
+ # the bin directory of the Gerrit installation
+ ##################################################
+ if [ "$GERRIT_SITE_1" = "." ]; then
+ GERRIT_SITE_1=`pwd`
+ fi
+
GERRIT_SITE_1=`dirname "$GERRIT_SITE_1"`
+
if test -f "${GERRIT_SITE_1}/${GERRIT_INSTALL_TRACE_FILE}" ; then
GERRIT_SITE=${GERRIT_SITE_1}
fi
@@ -241,7 +251,9 @@
fi
if test -z "$JAVA" ; then
- echo >&2 "Cannot find a JRE or JDK. Please set JAVA_HOME to a >=1.6 JRE"
+ echo >&2 "Cannot find a JRE or JDK. Please set JAVA_HOME or"
+ echo >&2 "container.javaHome in $GERRIT_SITE/etc/gerrit.config"
+ echo >&2 "to a >=1.6 JRE"
exit 1
fi
diff --git a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/libraries.config b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/libraries.config
index b99267c..f4c5808 100644
--- a/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/libraries.config
+++ b/gerrit-pgm/src/main/resources/com/google/gerrit/pgm/libraries.config
@@ -19,6 +19,6 @@
sha1 = 6327a5f7a3dc45e0fd735adb5d08c5a74c05c20c
[library "mysqlDriver"]
- name = MySQL Connector/J 5.1.10
- url = http://repo2.maven.org/maven2/mysql/mysql-connector-java/5.1.10/mysql-connector-java-5.1.10.jar
- sha1 = b83574124f1a00d6f70d56ba64aa52b8e1588e6d
+ name = MySQL Connector/J 5.1.21
+ url = http://repo2.maven.org/maven2/mysql/mysql-connector-java/5.1.21/mysql-connector-java-5.1.21.jar
+ sha1 = 7abbd19fc2e2d5b92c0895af8520f7fa30266be9
diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml
index 84f6f7b..0f95693 100644
--- a/gerrit-plugin-api/pom.xml
+++ b/gerrit-plugin-api/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-plugin-api</artifactId>
@@ -66,8 +66,8 @@
<exclude>com.google.gerrit:gerrit-patch-commonsnet</exclude>
<exclude>com.google.gerrit:gerrit-patch-jgit</exclude>
<exclude>com.google.gerrit:gerrit-util-ssl</exclude>
- <exclude>com.google.gerrit:juniversalchardet</exclude>
+ <exclude>com.googlecode.juniversalchardet:juniversalchardet</exclude>
<exclude>com.googlecode.prolog-cafe:PrologCafe</exclude>
<exclude>org.slf4j:slf4j-log4j12</exclude>
<exclude>log4j:log4j</exclude>
diff --git a/gerrit-plugin-archetype/pom.xml b/gerrit-plugin-archetype/pom.xml
index dd1794b..71feabc 100644
--- a/gerrit-plugin-archetype/pom.xml
+++ b/gerrit-plugin-archetype/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-plugin-archetype</artifactId>
diff --git a/gerrit-prettify/pom.xml b/gerrit-prettify/pom.xml
index 9354274..4db1056 100644
--- a/gerrit-prettify/pom.xml
+++ b/gerrit-prettify/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-prettify</artifactId>
diff --git a/gerrit-reviewdb/pom.xml b/gerrit-reviewdb/pom.xml
index f9fb49e..96599b3 100644
--- a/gerrit-reviewdb/pom.xml
+++ b/gerrit-reviewdb/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-reviewdb</artifactId>
diff --git a/gerrit-server/pom.xml b/gerrit-server/pom.xml
index af18173..2795424 100644
--- a/gerrit-server/pom.xml
+++ b/gerrit-server/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-server</artifactId>
@@ -162,7 +162,7 @@
</dependency>
<dependency>
- <groupId>com.google.gerrit</groupId>
+ <groupId>com.googlecode.juniversalchardet</groupId>
<artifactId>juniversalchardet</artifactId>
</dependency>
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/AutoRegisterModules.java b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
index e8af060..eacdfa0 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
@@ -299,7 +299,7 @@
return data;
}
- private static class ClassData implements ClassVisitor {
+ private static class ClassData extends ClassVisitor {
private static final String EXPORT = Type.getType(Export.class).getDescriptor();
private static final String LISTEN = Type.getType(Listen.class).getDescriptor();
@@ -308,6 +308,10 @@
String exportedAsName;
boolean listen;
+ ClassData() {
+ super(Opcodes.ASM4);
+ }
+
boolean isConcrete() {
return (access & Opcodes.ACC_ABSTRACT) == 0
&& (access & Opcodes.ACC_INTERFACE) == 0;
@@ -370,8 +374,12 @@
}
}
- private static abstract class AbstractAnnotationVisitor implements
+ private static abstract class AbstractAnnotationVisitor extends
AnnotationVisitor {
+ AbstractAnnotationVisitor() {
+ super(Opcodes.ASM4);
+ }
+
@Override
public AnnotationVisitor visitAnnotation(String arg0, String arg1) {
return null;
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/ChangeControl.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/ChangeControl.java
index 41f2aa6..9832a79 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/ChangeControl.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/ChangeControl.java
@@ -282,9 +282,10 @@
return true;
}
- // The branch owner, project owner, site admin can remove anyone.
- //
- if (getRefControl().isOwner() // branch owner
+ // Users with the remove reviewer permission, the branch owner, project
+ // owner and site admin can remove anyone
+ if (getRefControl().canRemoveReviewer() // has removal permissions
+ || getRefControl().isOwner() // branch owner
|| getProjectControl().isOwner() // project owner
|| getCurrentUser().getCapabilities().canAdministrateServer()) {
return true;
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java
index a6182d1..e98f84e 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/RefControl.java
@@ -322,6 +322,11 @@
return canPerform(Permission.ABANDON);
}
+ /** @return true if this user can remove a reviewer for a change. */
+ public boolean canRemoveReviewer() {
+ return canPerform(Permission.REMOVE_REVIEWER);
+ }
+
/** All value ranges of any allowed label permission. */
public List<PermissionRange> getLabelRanges() {
List<PermissionRange> r = new ArrayList<PermissionRange>();
diff --git a/gerrit-sshd/pom.xml b/gerrit-sshd/pom.xml
index 31b2422..3f3d166 100644
--- a/gerrit-sshd/pom.xml
+++ b/gerrit-sshd/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-sshd</artifactId>
diff --git a/gerrit-util-cli/pom.xml b/gerrit-util-cli/pom.xml
index 4886d09..5fe58eb 100644
--- a/gerrit-util-cli/pom.xml
+++ b/gerrit-util-cli/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-util-cli</artifactId>
diff --git a/gerrit-util-ssl/pom.xml b/gerrit-util-ssl/pom.xml
index beedb8f..69ae3b5 100644
--- a/gerrit-util-ssl/pom.xml
+++ b/gerrit-util-ssl/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-util-ssl</artifactId>
diff --git a/gerrit-war/pom.xml b/gerrit-war/pom.xml
index 1f3750e..a62831c 100644
--- a/gerrit-war/pom.xml
+++ b/gerrit-war/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<artifactId>gerrit-war</artifactId>
diff --git a/pom.xml b/pom.xml
index d7b5988..c1e2fd8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-parent</artifactId>
<packaging>pom</packaging>
- <version>2.5-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
<name>Gerrit Code Review - Parent</name>
<url>http://code.google.com/p/gerrit/</url>
@@ -47,7 +47,7 @@
<properties>
<jgitVersion>2.0.0.201206130900-r.23-gb3dbf19</jgitVersion>
- <gwtormVersion>1.4</gwtormVersion>
+ <gwtormVersion>1.5</gwtormVersion>
<gwtjsonrpcVersion>1.3</gwtjsonrpcVersion>
<gwtexpuiVersion>1.2.6</gwtexpuiVersion>
<gwtVersion>2.4.0</gwtVersion>
@@ -478,7 +478,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
- <version>12.0.1</version>
+ <version>13.0.1</version>
</dependency>
<dependency>
@@ -762,13 +762,13 @@
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
- <version>1.2.147</version>
+ <version>1.3.168</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
- <version>9.0-801.jdbc4</version>
+ <version>9.1-901-1.jdbc4</version>
</dependency>
<dependency>
@@ -821,7 +821,7 @@
</dependency>
<dependency>
- <groupId>com.google.gerrit</groupId>
+ <groupId>com.googlecode.juniversalchardet</groupId>
<artifactId>juniversalchardet</artifactId>
<version>1.0.3</version>
</dependency>
@@ -843,6 +843,17 @@
<artifactId>pegdown</artifactId>
<version>1.1.0</version>
</dependency>
+
+ <dependency>
+ <groupId>org.parboiled</groupId>
+ <artifactId>parboiled-core</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.parboiled</groupId>
+ <artifactId>parboiled-java</artifactId>
+ <version>1.1</version>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -863,11 +874,6 @@
</repository>
<repository>
- <id>objectweb-repository</id>
- <url>http://maven.objectweb.org/maven2/</url>
- </repository>
-
- <repository>
<id>clojars-repo</id>
<url>http://clojars.org/repo</url>
</repository>
@@ -876,5 +882,10 @@
<id>scala-tools</id>
<url>http://scala-tools.org/repo-releases</url>
</repository>
+
+ <repository>
+ <id>parboiled-repo</id>
+ <url>http://repo.spray.cc/</url>
+ </repository>
</repositories>
</project>