Merge branch 'stable-2.6'
* stable-2.6: Show 'No Differences' if diff is empty Add theme that displays Diffy on the left side of the top menu Support '${project}' token in dashboard title and description Minor corrections in the 2.6 release notes
This commit is contained in:
@@ -89,25 +89,32 @@ overridden by dashboards with the same ref and name. This makes
|
||||
it easy to define common dashboards for every project by simply
|
||||
defining project dashboards on the All-Projects project.
|
||||
|
||||
Token `${project}`
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Project dashboard queries may contain the special `${project}` token
|
||||
which will be replaced with the project name to which the dashboard is
|
||||
being applied. This is useful for defining dashboards designed to be
|
||||
inherited. With this token, it is possible to cause a query in a
|
||||
project dashboard to be restricted to only changes for the project in
|
||||
which an inherited dashboard is being applied by simply adding
|
||||
`project:${project}` to the query in the dashboard.
|
||||
which will be replaced with the name of the project to which the
|
||||
dashboard is being applied. This is useful for defining dashboards
|
||||
designed to be inherited. With this token, it is possible to cause a
|
||||
query in a project dashboard to be restricted to only changes for the
|
||||
project in which an inherited dashboard is being applied by simply
|
||||
adding `project:${project}` to the query in the dashboard.
|
||||
|
||||
Section dashboard
|
||||
~~~~~~~~~~~~~~~~~
|
||||
The `${project}` token can also be used in the link:#dashboard.title[
|
||||
dashboard title] and in the link:#dashboard.description[dashboard
|
||||
description].
|
||||
|
||||
dashboard.title::
|
||||
Section `dashboard`
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
[[dashboard.title]]dashboard.title::
|
||||
+
|
||||
The title of the dashboard.
|
||||
+
|
||||
If not specified the path of the dashboard config file is used as
|
||||
title.
|
||||
|
||||
dashboard.description::
|
||||
[[dashboard.description]]dashboard.description::
|
||||
+
|
||||
The description of the dashboard.
|
||||
|
||||
@@ -125,8 +132,8 @@ the project to which it is applied:
|
||||
----
|
||||
|
||||
|
||||
Section section
|
||||
~~~~~~~~~~~~~~~
|
||||
Section `section`
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
section.<name>.query::
|
||||
+
|
||||
|
@@ -521,9 +521,9 @@ to be explicitly assigned, even for site administrators.
|
||||
link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/access-control.html#category_publish_drafts[publishing]
|
||||
other users' draft changes is a new permission.
|
||||
|
||||
* Grant most permissions when creation `All-Projects`
|
||||
* Grant most permissions when creating `All-Projects`
|
||||
+
|
||||
Make Gerrit more like a Git server out of the box by granting both
|
||||
Make Gerrit more like a Git server out-of-the box by granting both
|
||||
Administrators and Project Owners permissions to review changes, submit
|
||||
them, create branches, create tags, and push directly to branches.
|
||||
|
||||
@@ -605,7 +605,7 @@ Selecting publish vs. draft should be done with the options `draft` or
|
||||
* Enable content merge by default
|
||||
+
|
||||
Most teams seem to expect Gerrit to manage simple merges within a
|
||||
source code file. Enable this out of the box.
|
||||
source code file. Enable this out-of-the-box.
|
||||
|
||||
* Added a link:http://gerrit-documentation.googlecode.com/svn/Documentation/2.6/config-gerrit.html#core.useRecursiveMerge[
|
||||
server-level option] to use JGit's new, experimental recursive merger.
|
||||
@@ -747,7 +747,7 @@ Labels
|
||||
+
|
||||
Most project teams seem confused with the out-of-the-box experience
|
||||
needing to vote on both `Code-Review` and `Verified` categories in
|
||||
order to submit a change. Simplify the out of the box workflow to only
|
||||
order to submit a change. Simplify the out-of-the-box workflow to only
|
||||
have `Code-Review`. When a team installs the Hudson/Jenkins integration
|
||||
or their own build system they can now trivially add the `Verified`
|
||||
category by pasting 5 lines into `project.config`.
|
||||
|
30
contrib/themes/diffy/etc/GerritSite.css
Normal file
30
contrib/themes/diffy/etc/GerritSite.css
Normal file
@@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 2013 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.
|
||||
*/
|
||||
|
||||
#gerrit_header {
|
||||
display: block !important;
|
||||
margin-bottom: -55px;
|
||||
padding-left: 20px;
|
||||
position: relative;
|
||||
top: -45px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
#gerrit_topmenu {
|
||||
left: 100px;
|
||||
margin-right: 100px;
|
||||
padding-right: 10px;
|
||||
position: relative;
|
||||
}
|
3
contrib/themes/diffy/etc/GerritSiteHeader.html
Normal file
3
contrib/themes/diffy/etc/GerritSiteHeader.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<img src="static/logo.png"/>
|
||||
</div>
|
BIN
contrib/themes/diffy/static/logo.png
Normal file
BIN
contrib/themes/diffy/static/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 KiB |
@@ -61,6 +61,8 @@ import com.google.gwtexpui.globalkey.client.KeyCommand;
|
||||
import com.google.gwtexpui.globalkey.client.KeyCommandSet;
|
||||
import com.google.gwtexpui.safehtml.client.SafeHtmlBuilder;
|
||||
|
||||
import org.eclipse.jgit.diff.Edit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -239,13 +241,27 @@ public abstract class AbstractPatchContentTable extends NavigationTable<Object>
|
||||
render(s, d);
|
||||
}
|
||||
|
||||
protected boolean hasDifferences(final PatchScript script) {
|
||||
// True if there are differences between the two patch sets
|
||||
boolean hasEdits = !script.getEdits().isEmpty();
|
||||
// True if this change is a mode change or a pure rename/copy
|
||||
boolean hasMeta = !script.getPatchHeader().isEmpty();
|
||||
protected boolean hasDifferences(PatchScript script) {
|
||||
return hasEdits(script) || hasMeta(script);
|
||||
}
|
||||
|
||||
return hasEdits || hasMeta;
|
||||
public boolean isPureMetaChange(PatchScript script) {
|
||||
return !hasEdits(script) && hasMeta(script);
|
||||
}
|
||||
|
||||
// True if there are differences between the two patch sets
|
||||
private boolean hasEdits(PatchScript script) {
|
||||
for (Edit e : script.getEdits()) {
|
||||
if (e.getType() != Edit.Type.EMPTY) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// True if this change is a mode change or a pure rename/copy
|
||||
private boolean hasMeta(PatchScript script) {
|
||||
return !script.getPatchHeader().isEmpty();
|
||||
}
|
||||
|
||||
protected void appendNoDifferences(SafeHtmlBuilder m) {
|
||||
|
@@ -420,14 +420,10 @@ public abstract class PatchScreen extends Screen implements
|
||||
break;
|
||||
}
|
||||
}
|
||||
// True if there are differences between the two patch sets
|
||||
boolean hasEdits = !script.getEdits().isEmpty();
|
||||
// True if this change is a mode change or a pure rename/copy
|
||||
boolean hasMeta = !script.getPatchHeader().isEmpty();
|
||||
|
||||
boolean pureMetaChange = !hasEdits && hasMeta;
|
||||
|
||||
if (contentTable instanceof SideBySideTable && pureMetaChange && !contentTable.isDisplayBinary) {
|
||||
if (contentTable instanceof SideBySideTable
|
||||
&& contentTable.isPureMetaChange(script)
|
||||
&& !contentTable.isDisplayBinary) {
|
||||
// User asked for SideBySide (or a link guessed, wrong) and we can't
|
||||
// show a pure-rename change there accurately. Switch to
|
||||
// the unified view instead. User can set file comments on binary file
|
||||
|
@@ -160,8 +160,8 @@ class DashboardsCollection implements
|
||||
DashboardInfo info = new DashboardInfo(refName, path);
|
||||
info.project = project;
|
||||
info.definingProject = definingProject.getName();
|
||||
info.title = config.getString("dashboard", null, "title");
|
||||
info.description = config.getString("dashboard", null, "description");
|
||||
info.title = replace(project, config.getString("dashboard", null, "title"));
|
||||
info.description = replace(project, config.getString("dashboard", null, "description"));
|
||||
info.foreach = config.getString("dashboard", null, "foreach");
|
||||
|
||||
if (setDefault) {
|
||||
|
Reference in New Issue
Block a user