Merge "Fix the request wrapper for http requests served from plugins" into stable-2.9
diff --git a/Documentation/.gitignore b/Documentation/.gitignore
new file mode 100644
index 0000000..8a3da24
--- /dev/null
+++ b/Documentation/.gitignore
@@ -0,0 +1,2 @@
+*.html
+/.published
diff --git a/Documentation/Makefile b/Documentation/Makefile
new file mode 100644
index 0000000..59de209
--- /dev/null
+++ b/Documentation/Makefile
@@ -0,0 +1,95 @@
+# Copyright (C) 2009 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.
+
+ASCIIDOC       ?= asciidoc
+ASCIIDOC_EXTRA ?=
+ASCIIDOC_VER   ?= 8.6.3
+SVN            ?= svn
+PUB_ROOT       ?= https://gerrit-documentation.googlecode.com/svn/Documentation
+
+all: html
+
+clean:
+	rm -f *.html
+	rm -rf $(LOCAL_ROOT)
+
+ASCIIDOC_EXE := $(shell which $(ASCIIDOC))
+ifeq ($(wildcard $(ASCIIDOC_EXE)),)
+  $(error $(ASCIIDOC) must be available)
+else
+  ASCIIDOC_OK := $(shell expr `asciidoc --version | cut -f2 -d' '` \>= $(ASCIIDOC_VER))
+  ifeq ($(ASCIIDOC_OK),0)
+    $(error $(ASCIIDOC) version $(ASCIIDOC_VER) or higher is required)
+  endif
+endif
+
+ifeq ($(origin VERSION), undefined)
+  VERSION := $(shell ./GEN-DOC-VERSION 2>/dev/null)
+endif
+
+DOC_HTML      := $(patsubst %.txt,%.html,$(wildcard *.txt))
+LOCAL_ROOT    := .published
+COMMIT        := $(shell git describe HEAD | sed s/^v//)
+PUB_DIR       := $(PUB_ROOT)/$(VERSION)
+PRIOR          = PRIOR
+
+ifeq ($(VERSION),)
+  REVISION = $(COMMIT)
+else
+  ifeq ($(VERSION),$(COMMIT))
+    REVISION := $(VERSION)
+  else
+    REVISION := $(VERSION) (from v$(COMMIT))
+  endif
+endif
+
+html: $(DOC_HTML)
+
+update: html
+ifeq ($(VERSION),)
+	./GEN-DOC-VERSION
+endif
+	@-rm -rf $(LOCAL_ROOT)
+	@echo "Checking out current $(VERSION)"
+	@if ! $(SVN) checkout $(PUB_DIR) $(LOCAL_ROOT) 2>/dev/null ; then \
+		echo "Copying $(PRIOR) to $(VERSION) ..." && \
+		$(SVN) cp -m "Create $(VERSION) documentation" $(PUB_ROOT)/$(PRIOR) $(PUB_DIR) && \
+		$(SVN) checkout $(PUB_DIR) $(LOCAL_ROOT) ; \
+	fi
+	@rm -f $(LOCAL_ROOT)/*.html
+	@cp *.html $(LOCAL_ROOT)
+	@cd $(LOCAL_ROOT) && \
+	  r=`$(SVN) status | perl -ne 'print if s/^!  *//' ` && \
+	  if [ -n "$$r" ]; then $(SVN) rm $$r; fi && \
+	  a=`$(SVN) status | perl -ne 'print if s/^\?  *//' ` && \
+	  if [ -n "$$a" ]; then \
+	    $(SVN) add $$a && \
+	    $(SVN) propset svn:mime-type text/html $$a ; \
+	    fi && \
+	  echo "Committing $(VERSION) at v$(COMMIT)" && \
+	  $(SVN) commit -m "Updated $(VERSION) documentation to v$(COMMIT)"
+	@-rm -rf $(LOCAL_ROOT)
+
+$(DOC_HTML): %.html : %.txt
+	@echo "FORMAT $@"
+	@rm -f $@+ $@
+	@$(ASCIIDOC) -a toc \
+		-a data-uri \
+		-a 'revision=$(REVISION)' \
+		-a 'newline=\n' \
+		-b xhtml11 \
+		-f asciidoc.conf \
+		$(ASCIIDOC_EXTRA) \
+		-o $@+ $<
+	@mv $@+ $@
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
new file mode 100644
index 0000000..2fe6213
--- /dev/null
+++ b/Documentation/asciidoc.conf
@@ -0,0 +1,29 @@
+[attributes]
+asterisk=&#42;
+plus=&#43;
+caret=&#94;
+startsb=&#91;
+endsb=&#93;
+tilde=&#126;
+
+[specialsections]
+GERRIT=gerrituplink
+
+[gerrituplink]
+<hr style="
+  height: 2px;
+  color: silver;
+  margin-top: 1.2em;
+  margin-bottom: 0.5em;
+">
+
+[macros]
+(?u)^(?P<name>get)::(?P<target>\S*?)$=#
+
+[get-blockmacro]
+<a id="{target}" onmousedown="javascript:
+  var i =  document.URL.lastIndexOf('/Documentation/');
+  var url = document.URL.substring(0, i) + '{target}';
+  document.getElementById('{target}').href = url;">
+    GET {target} HTTP/1.0
+</a>
diff --git a/Documentation/doc.css b/Documentation/doc.css
index 6b2cacd..c49b596 100644
--- a/Documentation/doc.css
+++ b/Documentation/doc.css
@@ -1,5 +1,6 @@
 body {
-  margin: 1em;
+  margin: 1em auto;
+  width: 900px;
 }
 
 #toctitle {
@@ -27,9 +28,9 @@
   border: 2px solid silver;
   background: #ebebeb;
   margin-left: 2em;
-  width: 100em;
   color: darkgreen;
   padding: 2px;
+  overflow: auto;
 }
 
 .listingblock > .content pre {
diff --git a/Documentation/images/user-review-ui-change-screen-commit-info-merge-commit.png b/Documentation/images/user-review-ui-change-screen-commit-info-merge-commit.png
new file mode 100644
index 0000000..75cd60c
--- /dev/null
+++ b/Documentation/images/user-review-ui-change-screen-commit-info-merge-commit.png
Binary files differ
diff --git a/Documentation/images/user-review-ui-change-screen-download-commands-list.png b/Documentation/images/user-review-ui-change-screen-download-commands-list.png
index fc398d3..b12e1f0 100644
--- a/Documentation/images/user-review-ui-change-screen-download-commands-list.png
+++ b/Documentation/images/user-review-ui-change-screen-download-commands-list.png
Binary files differ
diff --git a/Documentation/images/user-review-ui-change-screen-download-commands.png b/Documentation/images/user-review-ui-change-screen-download-commands.png
index cf636e4..6facd21 100644
--- a/Documentation/images/user-review-ui-change-screen-download-commands.png
+++ b/Documentation/images/user-review-ui-change-screen-download-commands.png
Binary files differ
diff --git a/Documentation/images/user-review-ui-change-screen-file-list.png b/Documentation/images/user-review-ui-change-screen-file-list.png
index 7b6026e..39c0e2b 100644
--- a/Documentation/images/user-review-ui-change-screen-file-list.png
+++ b/Documentation/images/user-review-ui-change-screen-file-list.png
Binary files differ
diff --git a/Documentation/images/user-review-ui-change-screen-history.png b/Documentation/images/user-review-ui-change-screen-history.png
index b28e693..3fe71d8 100644
--- a/Documentation/images/user-review-ui-change-screen-history.png
+++ b/Documentation/images/user-review-ui-change-screen-history.png
Binary files differ
diff --git a/Documentation/intro-quick.txt b/Documentation/intro-quick.txt
index d8734b2..9ff6058 100644
--- a/Documentation/intro-quick.txt
+++ b/Documentation/intro-quick.txt
@@ -8,14 +8,16 @@
 
 == What is Gerrit?
 
-I assume that if you're reading this then you're already convinced of
-the benefits of code review in general but want some technical support
-to make it easy. Code reviews mean different things to different people.
-To some it's a formal meeting with a projector and an entire team
-going through the code line by line. To others it's getting someone to
-glance over the code before it is committed.
+It is assumed that if you're reading this then you're already convinced
+of the benefits of code review in general but want some technical support
+to make it easy.
 
-Gerrit is intended to provide a light weight framework for reviewing
+Code reviews mean different things to different people. To some it's a
+formal meeting with a projector and an entire team going through the code
+line by line. To others it's getting someone to glance over the code before
+it is committed.
+
+Gerrit is intended to provide a lightweight framework for reviewing
 every commit before it is accepted into the code base. Changes are
 uploaded to Gerrit but don't actually become a part of the project
 until they've been reviewed and accepted. In many ways this is simply
@@ -159,8 +161,7 @@
 and why, you may even add a list of people that should review the change.
 
 Reviewers can find changes that they want to review in any number of
-ways. Gerrit has a capable
-link:user-search.html[search]
+ways. Gerrit has a capable link:user-search.html[search]
 that allows project leaders (or anyone else) to find changes that need
 to be reviewed. Users can also setup watches on Gerrit projects with a
 search expression, this causes Gerrit to notify them of matching
@@ -264,14 +265,21 @@
 Compressing objects: 100% (2/2), done.
 Writing objects: 100% (3/3), 546 bytes, done.
 Total 3 (delta 0), reused 0 (delta 0)
+remote: Processing changes: updated: 1, done
+remote:
+remote: Updated Changes:
+remote:   http://gerrithost:8080/68
+remote:
 To ssh://gerrithost:29418/RecipeBook.git
  * [new branch]      HEAD -> refs/for/master
 ----
 
-Note that the output is slightly different this time around. We don't
-get told about a new review because we're adding to an existing
-review. Having uploaded the reworked commit we can go back into the
-Gerrit web interface and look at our change.
+Note that the output is slightly different this time around. Since
+we're adding to an existing review it tells us that the change was
+updated.
+
+Having uploaded the reworked commit we can go back into the Gerrit web
+interface and look at our change.
 
 .Reviewing the Rework
 image::images/intro-quick-review-2-patches.jpg[Reviewing the Rework]
@@ -304,7 +312,7 @@
 branch from Gerrit and they will have the change.
 
 We don't even need to think about it that hard, if you look at the
-earlier screen shots of the Gerrit Code Review Screen you'll notice a
+earlier screenshots of the Gerrit Code Review Screen you'll notice a
 _download_ command. All we need to do to get the change is copy
 paste this command and run it in our Gerrit checkout.
 
diff --git a/Documentation/user-review-ui.txt b/Documentation/user-review-ui.txt
index bc476ae..5f4c2b7 100644
--- a/Documentation/user-review-ui.txt
+++ b/Documentation/user-review-ui.txt
@@ -107,6 +107,11 @@
 
 image::images/user-review-ui-change-screen-commit-info.png[width=800, link="images/user-review-ui-change-screen-commit-info.png"]
 
+If a merge commit is viewed this is highlighted by an icon. In this
+case the parent commits are also shown.
+
+image::images/user-review-ui-change-screen-commit-info-merge-commit.png[width=800, link="images/user-review-ui-change-screen-commit-info-merge-commit.png"]
+
 [[change-info]]
 === Change Info Block
 
@@ -489,7 +494,8 @@
 position of the changes in the list. Changes listed above the current
 change are descendants; changes below the current change are ancestors.
 +
-This tab is only available for open changes.
+For merged changes this tab is only shown if there are open
+descendants.
 +
 image::images/user-review-ui-change-screen-related-changes.png[width=800, link="images/user-review-ui-change-screen-related-changes.png"]
 +
@@ -1093,6 +1099,12 @@
 
 - The new side-by-side diff screen cannot render images.
 
+- Unified diff view is missing:
++
+By setting `Diff View (New Change Screen)` in the user preferences to
+`Unified Diff` the new change screen can be configured to open the file
+diffs in the old unified diff view.
+
 Users preferring the old review UI can link:#old-change-screen[
 configure the change view] in their preferences.
 
diff --git a/Documentation/user-search.txt b/Documentation/user-search.txt
index b995bc8..16dab4e 100644
--- a/Documentation/user-search.txt
+++ b/Documentation/user-search.txt
@@ -280,6 +280,7 @@
 +
 Same as <<status,status:'STATE'>>.
 
+[[mergeable]]
 is:mergeable::
 +
 True if the change has no merge conflicts and could be merged into its
diff --git a/ReleaseNotes/ReleaseNotes-2.8.5.txt b/ReleaseNotes/ReleaseNotes-2.8.5.txt
index 8865519..36f27d5 100644
--- a/ReleaseNotes/ReleaseNotes-2.8.5.txt
+++ b/ReleaseNotes/ReleaseNotes-2.8.5.txt
@@ -1,12 +1,28 @@
 Release notes for Gerrit 2.8.5
 ==============================
 
-There are no schema changes from link:ReleaseNotes-2.8.4.html[2.8.4].
-
 Download:
 link:https://gerrit-releases.storage.googleapis.com/gerrit-2.8.5.war[
 https://gerrit-releases.storage.googleapis.com/gerrit-2.8.5.war]
 
+Schema Changes and Upgrades
+---------------------------
+
+
+* There are no schema changes from link:ReleaseNotes-2.8.4.html[2.8.4].
+
+* SSHD is updated to version 0.11.0.
++
+See the 'ssh' section of 'Bug Fixes' below for details.
+
+* Bouncycastle is updated to version 1.49.
++
+*WARNING:* Gerrit is not shipped with Bouncycastle included. To get the
+updated library files, the site must be updated:
++
+----
+  java -jar gerrit.war init -d site_path
+----
 
 Bug Fixes
 ---------
diff --git a/ReleaseNotes/ReleaseNotes-2.9.txt b/ReleaseNotes/ReleaseNotes-2.9.txt
index 2037322..e7bf4f5 100644
--- a/ReleaseNotes/ReleaseNotes-2.9.txt
+++ b/ReleaseNotes/ReleaseNotes-2.9.txt
@@ -28,6 +28,9 @@
   java -jar gerrit.war reindex --recheck-mergeable -d site_path
 ----
 
+*WARNING* Support for query via the SQL index is removed. The usage of
+a secondary index is now mandatory.
+
 *WARNING:* Upgrading to 2.9.x requires the server be first upgraded to 2.1.7 (or
 a later 2.1.x version), and then to 2.9.x.  If you are upgrading from 2.2.x.x or
 later, you may ignore this warning and upgrade directly to 2.9.x.
@@ -49,46 +52,248 @@
 popup links to the review UI documentation and allows users to go back
 to the old change screen.
 
-* 'Gerrit Inspector' for interactive inspection and troubleshooting of a running
-Gerrit instance.
-
 
 New Features
 ------------
 
 
+Web UI
+~~~~~~
+
+
+Global
+^^^^^^
+
+* Project links by default link to the project dashboard
+
+
+New Change Screen
+^^^^^^^^^^^^^^^^^
+
+
+* The new change screen is now the default change screen.
+
+* The layout was changed so that the focus is now on the commit
+message, the change ID and the change status.
+
+* Draft comments are displayed in the reply box.
++
+There are links to navigate to the inline comments which can be used if
+a comment needs to be edited.
+
+* New inline comments from other users, that were published after the
+current user last reviewed this change, are highlighted in bold.
+
+* New summary comments from other users, that were published after the
+current user last reviewed this change, are automatically expanded in
+the change history.
++
+The support for the old comment visibility strategy is discontinued.
+
+* Inline comments are shown in the change history.
+
+* A reply icon is shown on each change message.
+
+* Quoting is possible when replying to a comment.
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-review-ui.html#related-changes[
+Related Changes] tabs:
+** `Cherry-Picks`
+** `Same Topic`
+** `Conflicts With`
+
+* The title of the `Patch Sets` drop-down panel shows the number of the
+currently viewed patch set and the total number of patch sets, in the
+form: "current patch set/number of patch sets".
+
+* The currently viewed patch set is displayed in the `Patch Sets` title
+
+* Keyboard shortcuts to navigate to next/previous patch set.
+
+* Support `[`, `/` and `]` keys to navigate between files in a cycle.
+
+* Show a tooltip on reviewers indicating on which labels they can vote.
+
+* The `Submit` button is enabled even if the change is not mergeable.
++
+This allows to do the conflict resolution for a change series in a
+single merge commit and submit the changes in reverse order.
+
+* New `Open All` button in files header.
+
+* If a merge commit is viewed this is highlighted by an icon. In this
+case the parent commits are also shown.
+
+
+Change List / Dashboards
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+* The `Status` column shows `Merge Conflict` for changes that are not
+mergeable.
+
+* A new `Size` column shows the change size as a colored bar.
+** The user preference `Show Change Sizes As Colored Bars In Changes Table`
+can be disabled to get the size information displayed as text.
+** The number of changed lines by which a change is considered as a
+large change can be
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#change.largeChange[
+configured].
+
+* Support to drill down into dashboard section
++
+Clicking on the section title executes the query of this section
+without the `limit` operator.
+
+
+Project Screens
+^^^^^^^^^^^^^^^
+
+* The general project screen provides a copyable clone command that
+automatically installs the `commit-msg` hook.
+
+* Project owners can change `HEAD` from the project branches screen.
+
+* Administrators can change the parent project from the project access
+screen; other users can save changes to the parent project for review
+and get the change approved by an administrator.
+
+* The project list displays icons for projects that are read only or
+hidden.
+
+* The Git garbage collection can be triggered from the general project
+screen if the user has the
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/access-control.html#capability_runGC[
+Run Garbage Collection] global capability.
+
+
+User Preferences
+^^^^^^^^^^^^^^^^
+
+* Users can choose the UK date format to render dates and timestamps in
+the UI.
+
+
 Secondary Index
 ~~~~~~~~~~~~~~~
 
 
 * New `--recheck-mergeable` option on the
 link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/pgm-reindex.html[
-`reindex` program].
+reindex] program.
 
 ssh
 ~~~
 
+* New `--notify` option on the
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/cmd-review.html[
+review] command allowing to control when email notifications should be
+sent.
 
-* New `--all-reviewers` option on the `query` command allowing query results
-to include information about all reviewers added on the change.
+* New `--branch` option on the
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/cmd-review.html[
+review] command.
+
+* New `--all-reviewers` option on the
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/cmd-query.html[
+query] command allowing query results to include information about all
+reviewers added on the change.
 
 * New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/cmd-apropos.html[
-`apropos` command] to search the Gerrit documentation.
+apropos] command to search the Gerrit documentation.
 
-* Deprecated `@CommandMetaData(descr)` has been discontinued. As of Gerrit 2.9
-  `@CommandMetaData(description)` annotation must be used.
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/cmd-create-branch.html[
+create-branch] command.
 
 REST API
 ~~~~~~~~
 
 
+Projects
+^^^^^^^^
+
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/rest-api-projects.html#get-content[
+Get content of a file from HEAD of a branch].
+
 Documentation
 ^^^^^^^^^^^^^
 
 
-* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/rest-api-documentation#search-documentation.html[
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/rest-api-documentation.html#search-documentation.html[
 Search documentation].
 
+Access Rights
+~~~~~~~~~~~~~
+
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/access-control.html#capability_viewAllAccounts[
+global capability for viewing all accounts].
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/access-control.html#capability_viewPlugins[
+global capability for viewing the list of installed plugins].
+
+* New `Change Owner` group that allows to assign label permissions to the change owner.
+
+* Support link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/access-control.html#category_submit_on_behalf_of[
+on behalf of for submit].
+
+* Allow service users to access REST API if `auth.gitBasicAuth = true`.
++
+If link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#auth.gitBasicAuth[
+auth.gitBasicAuth] is set to `true` in the `gerrit.config` file all
+HTTP traffic is authenticated using standard `BasicAuth` and the
+credentials are validated using the same auth method as configured for
+the Gerrit Web UI. E.g. for LDAP this means that users must use their
+LDAP password for Git over HTTP and for accessing the REST API.
++
+Service users are technical users that were created by the
+`create-account` SSH command. These users only exist in Gerrit and
+hence they do not have any LDAP password. This is why service users
+were not able to make use of the REST API if `auth.gitBasicAuth` was
+set to `true`.
++
+Now if `auth.gitBasicAuth` is set to `true` users that exist only in
+Gerrit but not in LDAP are authenticated with their HTTP password from
+the Gerrit database.
+
+Search
+~~~~~~
+
+* Support for query via the SQL index is removed. The usage of
+a secondary index is now mandatory.
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#mergeable[
+is:mergeable] search operator
++
+Finds changes that have no merge conflicts and can be merged into the
+destination branch.
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#parentproject[
+parentproject] search operator
++
+Finds changes in the specified project or in one of its child projects.
+
+* New link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#conflicts[
+conflicts] search operator
++
+Finds changes that conflict with the specified change.
+
+* New operators for absolute last-updated-on search
+** link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#before_until[
+before / until]
+** link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#after_since[
+after / since]
+
+* Support exact match on file parts in
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-search.html#file[
+file] operator
+
+* Query shortcuts
+** `o` = `owner`
+** `r` = `reviewer`
+** `p` = `project`
+** `f` = `file`
+
 Daemon
 ~~~~~~
 
@@ -99,24 +304,196 @@
 New `-s` option is added to the Daemon to start an interactive Jython shell for inspection and
 troubleshooting of live data of the Gerrit instance.
 
+Documentation
+~~~~~~~~~~~~~
+
+
+* The documentation is now
+https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/rest-api-documentation.html#search-documentation.html[
+searchable]:
++
+On each documentation page there is search box in the right top corner
+that allows to search in the documentation.
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/user-review-ui.html[
+Documentation of the new review UI]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/intro-project-owner.html[
+New Project Owner Guide]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/index.html[
+Newly structured documentation index]
+
+
+Configuration
+~~~~~~~~~~~~~
+
+* New init step for installing the `Verified` label.
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#repository.name.defaultSubmitType[
+Default submit type] for newly created projects can be configured.
+
+* `sshd_log` and `httpd_log` can use log4j configuration.
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#change.allowDrafts[
+Draft workflow can be disabled].
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-project-config.html#receive.checkReceivedObjects[
+Project configuration for checking of received objects].
+
+
+Misc
+~~~~
+
+* The removal of reviewers and their votes is recorded as a change
+message.
+
+* The change URL is returned on push if the change is updated.
+
+* The topic is included into merge commit messages if all merged
+changes have the same topic.
+
+* Stable CSS class names.
+
+
 Plugins
 ~~~~~~~
 
 
+* Plugin API to invoke the REST API.
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#screen[
+Plugins can add entire screens to Gerrit].
+
+* Plugins can have a
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#settings-screen[
+settings screen] which is linked from plugin list screen.
+
+* Support to edit
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#simple-project-specific-configuration[
+project plugin configuration parameters] in the UI.
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#plugins.allowRemoteAdmin[
+Remote plugin administration is by default disabled].
+
+
+Extension Points
+^^^^^^^^^^^^^^^^
+
+
+* Extension point to provide a "Message Of The Day"
+
+* Validation for
+** link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-validation.html#new-project-validation[
+project creation]
+** link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-validation.html#new-group-validation[
+group creation]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#init_step[
+Init steps can do initialization after the site is created]
+** The `All-Projects` `project.config` can be read and edited
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#receive-pack[
+Initialization of ReceivePack]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#post-receive-hook[
+Registration of PostReceiveHooks]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#root-level-commands[
+Registration of root level commands]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/dev-plugins.html#multiple-commands[
+Multiple SSH commands can be bound to the same class]
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/config-gerrit.html#database.dataSourceInterceptorClass[
+DataSource Interception]
+
+
+JavaScript Plugins
+^^^^^^^^^^^^^^^^^^
+
+
+* link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.9/js-api.html#self_on[
+JavaScript Callbacks]
+** Gerrit.on(\'history\', f)
+** Gerrit.on(\'submitchange\', f)
+** Gerrit.on(\'showchange\', f)
+
+* `change_plugins` element on the new change screen that allows to
+insert arbitrary HTML fragments from plugins
+
+
+Bug Fixes
+---------
+
+
+Secondary Index
+~~~~~~~~~~~~~~~
+
+* Fix Online Reindexing
+
+* Fix for full-text search with Lucene
++
+The full-text search was using a fuzzy query which used the edit
+distance to find terms in the index close to the provided search term.
+This produced bizarre results for queries like "message:1234".
++
+Instead, use Lucene's QueryBuilder with an analyzer to convert a
+full-text search word/phrase into a phrase query.
+
+
+Upgrades
+--------
+
+* Update JGit to 3.4.0.201405051725-m7
+* Update gwtjsonrpc to 1.5
+* Update gwtorm to 1.8
+* Update guava to 16.0
+* Update H2 to 1.3.174
+* Update Jetty to 9.1.0.v20131115
+* Update Servlet API to 3.1
+* Update Lucene to 4.6.0
+* Update GWT to 2.6.0
+
+
+Plugins
+-------
+
+Replication
+~~~~~~~~~~~
+
+* Default push refSpec is changed to `refs/*:refs/*` (non-forced push)
++
+The default push refSpec for the replication plugin has changed from `forced`
+to `non-forced` push (was `+refs/*:refs/*` and now is `refs/*:refs/*`). This change
+should not impact typical replication topologies where the slaves are read-only
+and can be pushed by their masters only. If you wanted explicitly to overwrite
+all changes on the slaves, you need to add a `push=+refs/*:refs/*` configuration
+entry for each replication target.
+
+* Support replication of HEAD updates
+
+* Stream events for ref replication
+
+* Replications failed due to "failed to lock" errors are retried
+
+* Configuration changes can be detected and replication is
+automatically restarted
+
 Issue Tracker System plugins
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+*WARNING:* The `hooks-*` plugins (`plugins/hooks-bugzilla`,
+`plugins/hooks-jira` and `plugins/hooks-rtc`) are deprecated with
+Gerrit 2.9.
 
-*WARNING:* There are new plugins for the integration with Bugzilla,
-Jira and IBM Rational Team Concert:
+There are new plugins for the integration with Bugzilla, Jira and IBM
+Rational Team Concert:
 
 * link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-bugzilla[plugins/its-bugzilla]
 * link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-jira[plugins/its-jira]
 * link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-rtc[plugins/its-rtc]
 
-The old plugins (`plugins/hooks-bugzilla`, `plugins/hooks-jira` and
-`plugins/hooks-rtc`) are deprecated with Gerrit 2.9.
-
 The new issue tracker system plugins have a common base which is
 link:https://gerrit-review.googlesource.com/#/admin/projects/plugins/its-base[plugins/its-base].
 
@@ -136,34 +513,3 @@
 * Whether the issue tracker integration is enabled/disabled for a
   project can be changed from the ProjectInfoScreen in the Gerrit
   WebUI.
-
-
-Bug Fixes
----------
-
-
-Configuration
-~~~~~~~~~~~~~
-
-
-* The number of accounts shown on the 'Become Any Account' login
-screen is increased from 5 to 100.
-
-Upgrades
---------
-
-* Update gwtjsonrpc to 1.4
-* Update gwtorm to 1.8
-
-Plugins
--------
-
-Replication
-~~~~~~~~~~~
-
-* The default push refSpec for the replication plugin has changed from `forced`
-to `non-forced` push (was `+refs/*:refs/*` and now is `refs/*:refs/*`). This change
-should not impact typical replication topologies where the slaves are read-only
-and can be pushed by their masters only. If you wanted explicitly to overwrite
-all changes on the slaves, you need to add a `push=+refs/*:refs/*` configuration
-entry for each replication target.
diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/LabelTypeIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/LabelTypeIT.java
index a2dd8ec..6506040 100644
--- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/LabelTypeIT.java
+++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/LabelTypeIT.java
@@ -21,6 +21,7 @@
 import com.google.gerrit.acceptance.NoHttpd;
 import com.google.gerrit.acceptance.PushOneCommit;
 import com.google.gerrit.common.data.LabelType;
+import com.google.gerrit.extensions.api.changes.CherryPickInput;
 import com.google.gerrit.extensions.api.changes.ReviewInput;
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.extensions.common.LabelInfo;
@@ -217,6 +218,63 @@
     assertApproval(r3, 1);
   }
 
+  @Test
+  public void copyAllScoresOnTrivialRebaseAndCherryPick() throws Exception {
+    codeReview.setCopyAllScoresOnTrivialRebase(true);
+    saveLabelConfig();
+
+    PushOneCommit.Result r1 = createChange();
+    git.checkout().setName(r1.getCommit().name()).call();
+
+    PushOneCommit push = pushFactory.create(db, admin.getIdent(),
+        PushOneCommit.SUBJECT, "b.txt", "other contents");
+    PushOneCommit.Result r2 = push.to(git, "refs/for/master");
+
+    revision(r2).review(ReviewInput.recommend());
+
+    CherryPickInput in = new CherryPickInput();
+    in.destination = "master";
+    in.message = String.format("%s\n\nChange-Id: %s",
+        PushOneCommit.SUBJECT,
+        r2.getChangeId());
+
+    doAssertApproval(1,
+        gApi.changes()
+            .id(r2.getChangeId())
+            .revision(r2.getCommit().name())
+            .cherryPick(in)
+            .get());
+  }
+
+  @Test
+  public void copyNoScoresOnReworkAndCherryPick()
+      throws Exception {
+    codeReview.setCopyAllScoresOnTrivialRebase(true);
+    saveLabelConfig();
+
+    PushOneCommit.Result r1 = createChange();
+
+    git.checkout().setName(r1.getCommit().name()).call();
+
+    PushOneCommit push = pushFactory.create(db, admin.getIdent(),
+        PushOneCommit.SUBJECT, "b.txt", "other contents");
+    PushOneCommit.Result r2 = push.to(git, "refs/for/master");
+
+    revision(r2).review(ReviewInput.recommend());
+
+    CherryPickInput in = new CherryPickInput();
+    in.destination = "master";
+    in.message = String.format("Cherry pick\n\nChange-Id: %s",
+        r2.getChangeId());
+
+    doAssertApproval(0,
+        gApi.changes()
+            .id(r2.getChangeId())
+            .revision(r2.getCommit().name())
+            .cherryPick(in)
+            .get());
+  }
+
   private void saveLabelConfig() throws Exception {
     ProjectConfig cfg = projectCache.checkedGet(allProjects).getConfig();
     cfg.getLabelSections().clear();
@@ -254,6 +312,10 @@
     // Don't use asserts from PushOneCommit so we can test the round-trip
     // through JSON instead of querying the DB directly.
     ChangeInfo c = get(r.getChangeId());
+    doAssertApproval(expected, c);
+  }
+
+  private void doAssertApproval(int expected, ChangeInfo c) {
     LabelInfo cr = c.labels.get("Code-Review");
     assertEquals(1, cr.all.size());
     assertEquals("Administrator", cr.all.get(0).name);
diff --git a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java
index 1a8c275..a0392f8 100644
--- a/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java
+++ b/gerrit-gwtexpui/src/main/java/com/google/gwtexpui/clippy/client/CopyableLabel.java
@@ -22,6 +22,8 @@
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.KeyPressEvent;
 import com.google.gwt.event.dom.client.KeyPressHandler;
+import com.google.gwt.event.dom.client.KeyUpEvent;
+import com.google.gwt.event.dom.client.KeyUpHandler;
 import com.google.gwt.http.client.URL;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
@@ -189,9 +191,14 @@
             switch (event.getCharCode()) {
               case 'c':
               case 'x':
-                Scheduler.get().scheduleDeferred(new Command() {
-                  public void execute() {
-                    hideTextBox();
+                textBox.addKeyUpHandler(new KeyUpHandler() {
+                  @Override
+                  public void onKeyUp(final KeyUpEvent event) {
+                    Scheduler.get().scheduleDeferred(new Command() {
+                      public void execute() {
+                        hideTextBox();
+                      }
+                    });
                   }
                 });
                 break;
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java
index 3319457..19d50ff 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java
@@ -69,4 +69,7 @@
 
   @Source("warning.png")
   public ImageResource warning();
+
+  @Source("important.png")
+  public ImageResource important();
 }
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.java
index d26ee7d..b0a6160 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.java
@@ -62,7 +62,8 @@
   String userName();
   String password();
   String buttonSetUserName();
-  String buttonChangeUserName();
+  String confirmSetUserNameTitle();
+  String confirmSetUserName();
   String buttonClearPassword();
   String buttonGeneratePassword();
   String linkObtainPassword();
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
index 633af29..63cb871 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/AccountConstants.properties
@@ -42,7 +42,8 @@
 userName = Username
 password = Password
 buttonSetUserName = Select Username
-buttonChangeUserName = Change Username
+confirmSetUserNameTitle = Confirm Setting the Username
+confirmSetUserName = Setting the Username is permanent.  Are you sure?
 buttonClearPassword = Clear Password
 buttonGeneratePassword = Generate Password
 linkObtainPassword = Obtain Password
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/UsernameField.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/UsernameField.java
index 0666bb3..bf4d75c 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/UsernameField.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/account/UsernameField.java
@@ -14,6 +14,8 @@
 
 package com.google.gerrit.client.account;
 
+import com.google.gerrit.client.ConfirmationCallback;
+import com.google.gerrit.client.ConfirmationDialog;
 import com.google.gerrit.client.ErrorDialog;
 import com.google.gerrit.client.Gerrit;
 import com.google.gerrit.client.rpc.GerritCallback;
@@ -31,6 +33,7 @@
 import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwtexpui.clippy.client.CopyableLabel;
 import com.google.gwtexpui.globalkey.client.NpTextBox;
+import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
 import com.google.gwtjsonrpc.common.VoidResult;
 
 class UsernameField extends Composite {
@@ -59,7 +62,7 @@
         @Override
         public void onKeyPress(KeyPressEvent event) {
           if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
-            doSetUserName();
+            confirmSetUserName();
           }
         }
       });
@@ -70,7 +73,7 @@
       setUserName.addClickHandler(new ClickHandler() {
         @Override
         public void onClick(final ClickEvent event) {
-          doSetUserName();
+          confirmSetUserName();
         }
       });
       new OnEditEnabler(setUserName, userNameTxt);
@@ -86,6 +89,18 @@
     return Gerrit.getConfig().canEdit(Account.FieldName.USER_NAME);
   }
 
+  private void confirmSetUserName() {
+    new ConfirmationDialog(
+        Util.C.confirmSetUserNameTitle(),
+        new SafeHtmlBuilder().append(Util.C.confirmSetUserName()),
+        new ConfirmationCallback() {
+          @Override
+          public void onOk() {
+            doSetUserName();
+          }
+        }).center();
+  }
+
   private void doSetUserName() {
     if (!canEditUserName()) {
       return;
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.java
index 931a94b..4ba5793 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.java
@@ -21,11 +21,13 @@
 import com.google.gerrit.client.changes.ChangeInfo.CommitInfo;
 import com.google.gerrit.client.changes.ChangeInfo.GitPerson;
 import com.google.gerrit.client.changes.ChangeInfo.RevisionInfo;
+import com.google.gerrit.client.rpc.Natives;
 import com.google.gerrit.client.ui.CommentLinkProcessor;
 import com.google.gerrit.client.ui.InlineHyperlink;
 import com.google.gerrit.common.PageLinks;
 import com.google.gerrit.reviewdb.client.Change.Status;
 import com.google.gwt.core.client.GWT;
+import com.google.gwt.core.client.JsArray;
 import com.google.gwt.dom.client.AnchorElement;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.event.dom.client.ClickEvent;
@@ -33,12 +35,16 @@
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
 import com.google.gwt.uibinder.client.UiHandler;
+import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.Composite;
+import com.google.gwt.user.client.ui.FlowPanel;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HTMLPanel;
+import com.google.gwt.user.client.ui.Image;
 import com.google.gwt.user.client.ui.ScrollPanel;
 import com.google.gwt.user.client.ui.UIObject;
+import com.google.gwt.user.client.ui.VerticalPanel;
 import com.google.gwtexpui.clippy.client.CopyableLabel;
 import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
 
@@ -49,11 +55,17 @@
   interface Style extends CssResource {
     String collapsed();
     String expanded();
+    String clippy();
+    String parentWebLink();
   }
 
   @UiField Style style;
+  @UiField Image mergeCommit;
   @UiField CopyableLabel commitName;
   @UiField AnchorElement browserLink;
+  @UiField Element parents;
+  @UiField FlowPanel parentCommits;
+  @UiField VerticalPanel parentWebLinks;
   @UiField InlineHyperlink authorNameEmail;
   @UiField Element authorDate;
   @UiField InlineHyperlink committerNameEmail;
@@ -108,6 +120,28 @@
     } else {
       UIObject.setVisible(browserLink, false);
     }
+
+    if (revInfo.commit().parents().length() > 1) {
+      mergeCommit.setVisible(true);
+      setParents(change.project(), revInfo.commit().parents());
+    }
+  }
+
+  private void setParents(String project, JsArray<CommitInfo> commits) {
+    setVisible(parents, true);
+    for (CommitInfo c : Natives.asList(commits)) {
+      CopyableLabel copyLabel = new CopyableLabel(c.commit());
+      copyLabel.setStyleName(style.clippy());
+      parentCommits.add(copyLabel);
+
+      GitwebLink gw = Gerrit.getGitwebLink();
+      if (gw != null) {
+        Anchor a =
+            new Anchor(gw.toRevision(project, c.commit()), gw.getLinkName());
+        a.setStyleName(style.parentWebLink());
+        parentWebLinks.add(a);
+      }
+    }
   }
 
   private static void formatLink(GitPerson person, InlineHyperlink name,
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.ui.xml b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.ui.xml
index c02e9f8..34454f0 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.ui.xml
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.ui.xml
@@ -19,6 +19,7 @@
     xmlns:g='urn:import:com.google.gwt.user.client.ui'
     xmlns:x='urn:import:com.google.gerrit.client.ui'
     xmlns:clippy='urn:import:com.google.gwtexpui.clippy.client'>
+  <ui:with field='ico' type='com.google.gerrit.client.GerritResources'/>
   <ui:image field="toggle" src="more_less.png"/>
   <ui:style type='com.google.gerrit.client.change.CommitBox.Style'>
     @eval trimColor com.google.gerrit.client.Gerrit.getTheme().trimColor;
@@ -78,7 +79,16 @@
       position: absolute;
       top: 0px;
       right: -16px;
-     }
+    }
+    <!-- To make room for the copyableLabel from the adjacent column -->
+    .parentWebLink {
+      margin-left:16px;
+    }
+
+    .mergeCommit {
+      margin-right: 3px;
+      float: left;
+    }
   </ui:style>
   <g:HTMLPanel>
     <g:ScrollPanel styleName='{style.scroll}' ui:field='scroll'>
@@ -112,10 +122,30 @@
         <td ui:field='committerDate' class='{style.date}' colspan="2"/>
       </tr>
       <tr>
-        <th><ui:msg>Commit</ui:msg></th>
+        <th>
+          <div class='{style.mergeCommit}'>
+            <ui:msg>Commit</ui:msg>
+          </div>
+          <g:Image
+              ui:field='mergeCommit'
+              resource='{ico.important}'
+              visible='false'
+              title='Merge Commit'>
+            <ui:attribute name='title'/>
+          </g:Image>
+        </th>
         <td><clippy:CopyableLabel styleName='{style.clippy}' ui:field='commitName'/></td>
         <td><a style="margin-left:16px;" ui:field='browserLink' href=""/></td>
       </tr>
+      <tr ui:field='parents' style='display: none'>
+        <th><ui:msg>Parents</ui:msg></th>
+        <td>
+          <g:FlowPanel ui:field='parentCommits'/>
+        </td>
+        <td>
+          <g:VerticalPanel ui:field='parentWebLinks'/>
+        </td>
+      </tr>
       <tr>
         <th><ui:msg>Change-Id</ui:msg></th>
         <td><clippy:CopyableLabel styleName='{style.clippy}' ui:field='idText'/></td>
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java
index 1690d5c..5a0ba15 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/RelatedChanges.java
@@ -174,6 +174,14 @@
       setForOpenChange(info, revision);
     }
 
+    ChangeApi.revision(info.legacy_id().get(), revision).view("related")
+        .get(new TabCallback<RelatedInfo>(Tab.RELATED_CHANGES, info.project(), revision) {
+              @Override
+              public JsArray<ChangeAndCommit> convert(RelatedInfo result) {
+                return result.changes();
+              }
+            });
+
     StringBuilder cherryPicksQuery = new StringBuilder();
     cherryPicksQuery.append(op("project", info.project()));
     cherryPicksQuery.append(" ").append(op("change", info.change_id()));
@@ -197,14 +205,6 @@
   }
 
   private void setForOpenChange(final ChangeInfo info, final String revision) {
-    ChangeApi.revision(info.legacy_id().get(), revision).view("related")
-        .get(new TabCallback<RelatedInfo>(Tab.RELATED_CHANGES, info.project(), revision) {
-              @Override
-              public JsArray<ChangeAndCommit> convert(RelatedInfo result) {
-                return result.changes();
-              }
-            });
-
     if (info.mergeable()) {
       StringBuilder conflictsQuery = new StringBuilder();
       conflictsQuery.append("status:open");
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/important.png b/gerrit-gwtui/src/main/java/com/google/gerrit/client/important.png
new file mode 100644
index 0000000..81e9ed2
--- /dev/null
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/important.png
Binary files differ
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java
index 3915449..3ae4602 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/CherryPickChange.java
@@ -206,6 +206,7 @@
       .setMessage("Uploaded patch set " + newPatchSetId.get() + ".")
       .setDraft(current.isDraft())
       .setUploader(uploader.getAccountId())
+      .setCopyLabels(true)
       .insert();
     return change.getId();
   }
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/project/PermissionCollection.java b/gerrit-server/src/main/java/com/google/gerrit/server/project/PermissionCollection.java
index 3b6ce91..dbfe34b 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/project/PermissionCollection.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/project/PermissionCollection.java
@@ -110,7 +110,6 @@
       sorter.sort(ref, sections);
 
       Set<SeenRule> seen = new HashSet<SeenRule>();
-      Set<SeenRule> seenBlockingRules = new HashSet<SeenRule>();
       Set<String> exclusiveGroupPermissions = new HashSet<String>();
 
       HashMap<String, List<PermissionRule>> permissions =
@@ -126,7 +125,7 @@
             SeenRule s = new SeenRule(section, permission, rule);
             boolean addRule;
             if (rule.isBlock()) {
-              addRule = seenBlockingRules.add(s);
+              addRule = true;
             } else {
               addRule = seen.add(s) && !rule.isDeny() && !exclusivePermissionExists;
             }
diff --git a/gerrit-server/src/test/java/com/google/gerrit/server/project/RefControlTest.java b/gerrit-server/src/test/java/com/google/gerrit/server/project/RefControlTest.java
index 5b5b318..54765ac 100644
--- a/gerrit-server/src/test/java/com/google/gerrit/server/project/RefControlTest.java
+++ b/gerrit-server/src/test/java/com/google/gerrit/server/project/RefControlTest.java
@@ -299,9 +299,18 @@
   public void testBlockRule_ParentBlocksChild() {
     grant(local, PUSH, DEVS, "refs/tags/*");
     grant(util.getParentConfig(), PUSH, ANONYMOUS_USERS, "refs/tags/*").setBlock();
+    ProjectControl u = util.user(local, DEVS);
+    assertFalse("u can't update tag", u.controlForRef("refs/tags/V10").canUpdate());
+  }
+
+  @Test
+  public void testBlockRule_ParentBlocksChildEvenIfAlreadyBlockedInChild() {
+    grant(local, PUSH, DEVS, "refs/tags/*");
+    grant(local, PUSH, ANONYMOUS_USERS, "refs/tags/*").setBlock();
+    grant(util.getParentConfig(), PUSH, ANONYMOUS_USERS, "refs/tags/*").setBlock();
 
     ProjectControl u = util.user(local, DEVS);
-    assertFalse("u can't force update tag", u.controlForRef("refs/tags/V10").canForceUpdate());
+    assertFalse("u can't update tag", u.controlForRef("refs/tags/V10").canUpdate());
   }
 
   @Test
@@ -319,6 +328,23 @@
   }
 
   @Test
+  public void testBlockLabelRange_ParentBlocksChildEvenIfAlreadyBlockedInChild() {
+    grant(local, LABEL + "Code-Review", -2, +2, DEVS, "refs/heads/*");
+    grant(local, LABEL + "Code-Review", -2, +2, DEVS, "refs/heads/*").setBlock();
+    grant(util.getParentConfig(), LABEL + "Code-Review", -2, +2, DEVS,
+        "refs/heads/*").setBlock();
+
+    ProjectControl u = util.user(local, DEVS);
+
+    PermissionRange range =
+        u.controlForRef("refs/heads/master").getRange(LABEL + "Code-Review");
+    assertTrue("u can vote -1", range.contains(-1));
+    assertTrue("u can vote +1", range.contains(1));
+    assertFalse("u can't vote -2", range.contains(-2));
+    assertFalse("u can't vote 2", range.contains(2));
+  }
+
+  @Test
   public void testUnblockNoForce() {
     grant(local, PUSH, ANONYMOUS_USERS, "refs/heads/*").setBlock();
     grant(local, PUSH, DEVS, "refs/heads/*");