Merge branch 'stable-2.9'

* stable-2.9:
  Highlight merge commit on change screen
  Fix testBlockRule_ParentBlocksChild() from RefControlTest
  Documentation: Fix REST API example box width
  Describe new REST endpoints in 2.9 release notes
  Describe most important search updates in 2.9 release notes
  Describe most important access rights updates in 2.9 release notes
  Describe most important SSH updates in 2.9 release notes
  Show parent commits on change screen if merge commit is viewed
  Describe most important documentation updates in 2.9 release notes
  Minor rework of initial version of 2.9 release notes

Conflicts:
	gerrit-gwtui/src/main/java/com/google/gerrit/client/GerritResources.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.java
	gerrit-gwtui/src/main/java/com/google/gerrit/client/change/CommitBox.ui.xml

Change-Id: I17e552ea0fef78ddb09fb88ccd1a7c80daa53c0f
This commit is contained in:
Edwin Kempin 2014-05-15 08:31:47 +02:00
commit 21dfa5bd21
10 changed files with 195 additions and 23 deletions

View File

@ -28,9 +28,9 @@ li p {
border: 2px solid silver;
background: #ebebeb;
margin-left: 2em;
width: 100em;
color: darkgreen;
padding: 2px;
overflow: auto;
}
.listingblock > .content pre {

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -107,6 +107,11 @@ is also a link to the commit in the Git web browser.
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

View File

@ -281,6 +281,7 @@ is:submitted, is:merged, is:abandoned::
+
Same as <<status,status:'STATE'>>.
[[mergeable]]
is:mergeable::
+
True if the change has no merge conflicts and could be merged into its

View File

@ -28,6 +28,9 @@ Schema Change
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,9 +52,6 @@ informed about the new change screen by a welcome popup. The welcome
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
------------
@ -63,32 +63,121 @@ 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,6 +188,26 @@ Gerrit Inspector]: interactive Jython shell.
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]
Plugins
~~~~~~~
@ -142,17 +251,10 @@ 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 gwtjsonrpc to 1.5
* Update gwtorm to 1.8
Plugins

View File

@ -78,4 +78,7 @@ public interface GerritResources extends ClientBundle {
@Source("listAdd.png")
public ImageResource listAdd();
@Source("important.png")
public ImageResource important();
}

View File

@ -38,11 +38,15 @@ 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.DOM;
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.VerticalPanel;
import com.google.gwtexpui.clippy.client.CopyableLabel;
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
@ -53,11 +57,17 @@ class CommitBox extends Composite {
interface Style extends CssResource {
String collapsed();
String expanded();
String clippy();
String parentWebLink();
}
@UiField Style style;
@UiField Image mergeCommit;
@UiField CopyableLabel commitName;
@UiField TableCellElement webLinkCell;
@UiField Element parents;
@UiField FlowPanel parentCommits;
@UiField VerticalPanel parentWebLinks;
@UiField InlineHyperlink authorNameEmail;
@UiField Element authorDate;
@UiField InlineHyperlink committerNameEmail;
@ -105,6 +115,11 @@ class CommitBox extends Composite {
text.setHTML(commentLinkProcessor.apply(
new SafeHtmlBuilder().append(commit.message()).linkify()));
setWebLinks(change, revision, revInfo);
if (revInfo.commit().parents().length() > 1) {
mergeCommit.setVisible(true);
setParents(change.project(), revInfo.commit().parents());
}
}
private void setWebLinks(ChangeInfo change, String revision,
@ -129,6 +144,23 @@ class CommitBox extends Composite {
webLinkCell.appendChild(a);
}
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,
Element date, Status status) {
name.setText(renderName(person));

View File

@ -19,6 +19,7 @@ limitations under the License.
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,11 +79,19 @@ limitations under the License.
position: absolute;
top: 0px;
right: -16px;
}
<!-- To make room for the copyableLabel from the adjacent column -->
}
<!-- To make room for the copyableLabel from the adjacent column -->
.webLinkCell a:first-child {
margin-left:16px;
}
.parentWebLink {
margin-left:16px;
}
.mergeCommit {
margin-right: 3px;
float: left;
}
</ui:style>
<g:HTMLPanel>
<g:ScrollPanel styleName='{style.scroll}' ui:field='scroll'>
@ -116,10 +125,30 @@ limitations under the License.
<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 ui:field='webLinkCell' class='{style.webLinkCell}'></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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

View File

@ -301,7 +301,7 @@ public class RefControlTest {
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