Merge "ChangeScreen2: Pass revision to initEditMode"
diff --git a/Documentation/cmd-index.txt b/Documentation/cmd-index.txt
index f465dcd..22d65ad 100644
--- a/Documentation/cmd-index.txt
+++ b/Documentation/cmd-index.txt
@@ -19,7 +19,7 @@
=== [[client_commands]]Commands
link:cmd-cherry-pick.html[gerrit-cherry-pick]::
- Download and cherry-pick one or more changes (commits).
+ Download and cherry-pick one or more changes (commits).
=== [[client_hooks]]Hooks
@@ -28,7 +28,7 @@
server.
link:cmd-hook-commit-msg.html[commit-msg]::
- Automatically generate `Change-Id: ` tags in commit messages.
+ Automatically generate `Change-Id: ` tags in commit messages.
== Server
@@ -76,7 +76,7 @@
Verify, approve and/or submit a patch set from the command line.
link:cmd-set-reviewers.html[gerrit set-reviewers]::
- Add or remove reviewers on a change.
+ Add or remove reviewers on a change.
link:cmd-stream-events.html[gerrit stream-events]::
Monitor events occurring in real time.
@@ -91,7 +91,7 @@
review. See link:user-upload.html#push_create[Creating Changes].
git upload-pack::
- Standard Git server side command for client side `git fetch`.
+ Standard Git server side command for client side `git fetch`.
[[admin_commands]]Administrator Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -115,34 +115,34 @@
Administrative interface to active database.
link:cmd-logging-ls-level.html[gerrit logging ls-level]::
- List loggers and their logging level.
+ List loggers and their logging level.
link:cmd-logging-set-level.html[gerrit logging set-level]::
- Set the logging level of loggers.
+ Set the logging level of loggers.
link:cmd-ls-user-refs.html[gerrit ls-user-refs]::
Lists refs visible for a specified user.
link:cmd-plugin-install.html[gerrit plugin add]::
- Alias for 'gerrit plugin install'.
+ Alias for 'gerrit plugin install'.
link:cmd-plugin-enable.html[gerrit plugin enable]::
- Enable plugins.
+ Enable plugins.
link:cmd-plugin-install.html[gerrit plugin install]::
- Install/Add a plugin.
+ Install/Add a plugin.
link:cmd-plugin-ls.html[gerrit plugin ls]::
- List the installed plugins.
+ List the installed plugins.
link:cmd-plugin-reload.html[gerrit plugin reload]::
- Reload/Restart plugins.
+ Reload/Restart plugins.
link:cmd-plugin-remove.html[gerrit plugin remove]::
- Disable plugins.
+ Disable plugins.
link:cmd-plugin-remove.html[gerrit plugin rm]::
- Alias for 'gerrit plugin remove'.
+ Alias for 'gerrit plugin remove'.
link:cmd-set-account.html[gerrit set-account]::
Change an account's settings.
@@ -151,7 +151,7 @@
Set group members.
link:cmd-set-project.html[gerrit set-project]::
- Change a project's settings.
+ Change a project's settings.
link:cmd-set-project-parent.html[gerrit set-project-parent]::
Change the project permissions are inherited from.
diff --git a/ReleaseNotes/ReleaseNotes-2.11.txt b/ReleaseNotes/ReleaseNotes-2.11.txt
index 43a8ce6..6a88ede 100644
--- a/ReleaseNotes/ReleaseNotes-2.11.txt
+++ b/ReleaseNotes/ReleaseNotes-2.11.txt
@@ -121,8 +121,14 @@
Change Screen
^^^^^^^^^^^^^
+* Remove the 'Edit Message' button from the change screen.
++
+The commit message is now edited using the inline edit feature.
+
* Show the parent commit's subject as a tooltip.
+* Decorate abandoned changes in the 'Related Changes' list with a dark red dot.
+
* link:http://code.google.com/p/gerrit/issues/detail?id=2541[Issue 2541],
link:http://code.google.com/p/gerrit/issues/detail?id=2974[Issue 2974]:
Allow the 'Reply' button's
@@ -132,6 +138,8 @@
Side-By-Side Diff
^^^^^^^^^^^^^^^^^
+* New button to switch between side-by-side diff and unified diff.
+
* New preference setting to toggle auto-hiding of the diff table header.
+
The setting determines whether or not the diff table header with the patch set
@@ -161,6 +169,13 @@
Changes
^^^^^^^
+* The https://gerrit-review.googlesource.com/Documentation/2.11/rest-api-changes.html#message[
+Edit Commit Message] endpoint is deprecated in favor of the new
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-changes.html#put-change-edit-message[
+Change commit message in Change Edit] and
+link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-changes.html#publish-edit[
+Publish Change Edit] endpoints.
+
* Add new
link:https://gerrit-documentation.storage.googleapis.com/Documentation/2.11/rest-api-changes.html#check-change[
check change endpoint].
@@ -365,6 +380,11 @@
register static/init.js as WebUi extension if found by the plugin content
scanner.
+* Plugins can validate outgoing emails.
++
+Plugins implementing `OutgoingEmailValidationListener` interface can filter
+and modify outgoing emails before they are sent.
+
* Plugins that provide initialization steps may now use functionality
from InitUtil in core Gerrit.
@@ -374,6 +394,9 @@
** Get mergeable status.
** link:https://code.google.com/p/gerrit/issues/detail?id=461[Issue 461]:
Get current user.
+** Get file content.
+** Get file diff.
+** Get comments and drafts.
Replication
^^^^^^^^^^^
@@ -387,11 +410,11 @@
Daemon
~~~~~~
-* Change "Merge topic" to "Merge changes from topic".
+* Change 'Merge topic' to 'Merge changes from topic'.
+
When multiple changes from a topic are submitted resulting in a merge commit,
-the title of the merge commit is now "Merge changes from topic" instead of
-"Merge topic".
+the title of the merge commit is now 'Merge changes from topic' instead of
+'Merge topic'.
* Fix visibility checks for `refs/meta/config`.
+
@@ -404,7 +427,7 @@
Improve warning messages when Change-Id is missing in the commit message.
** Add a hint to amend the commit after installing the commit-msg hook.
-** Don't show "Suggestion for commit message" when Change-Id is missing.
+** Don't show 'Suggestion for commit message' when Change-Id is missing.
Secondary Index / Search
@@ -438,9 +461,55 @@
Change Screen
^^^^^^^^^^^^^
+* link:http://code.google.com/p/gerrit/issues/detail?id=2894[Issue 2894]:
+Link to change screen for merged or abandoned changes in the 'Related Changes'
+list.
++
+For changes in the 'Related Changes' tab that are closed the link was
+bringing the user to GitWeb, and not as expected to the change screen.
+
+* Show a confirmation dialog before deleting a draft change or patch set.
++
+Previously there was no confirmation and a draft change or revision patch
+set would be lost if the button was accidentally clicked.
+
+* link:https://code.google.com/p/gerrit/issues/detail?id=2533[Issue 2533]:
+Improve the layout and color scheme of buttons.
++
+Several improvements have been made:
++
+** Move 'Publish' and 'Delete Change/Revision' buttons into header.
++
+If a change/revision is a draft the natural next step is to publish (or delete)
+it, hence these buttons should be displayed in a more prominent place.
+
+** Highlight the 'Publish' button in blue.
++
+If a change is a draft the natural next step is to publish it, hence
+the 'Publish' button should be highlighted similar to the quick
+approve button.
+
+** Fix the border color of buttons on the reply popup.
++
+The buttons are blue but had white borders, which was inconsistent with the
+buttons on the change screen.
+
+** Remove red color for 'Abandon' and 'Restore' buttons.
++
+There is nothing dangerous about these operations that justifies
+highlighting the buttons in red color. When the buttons are clicked
+there is a popup where the user must confirm the operation, so it can
+still be cancelled.
+
+** Hide quick approve button for draft changes.
++
+A draft change cannot be submitted, hence quick approving it is not that
+important. Hiding the quick approve button on draft changes makes space in the
+header for displaying more important actions such as 'Publish'.
+
* Differentiate between conflicts and already merged errors in cherry-pick
+
-When a cherry-pick operation failed with "Cherry pick failed" error, there was no
+When a cherry-pick operation failed with 'Cherry pick failed' error, there was no
way to know the reason for the failure: merge conflict or the commit is already
on the target branch. These failures are now differentiated and a proper error
is reported to the client.
@@ -477,8 +546,8 @@
* link:http://code.google.com/p/gerrit/issues/detail?id=3007[Issue 3007]:
Make the selected tab persistent.
+
-If a change from the "Same Topic" tab was clicked, the selected tab would reset
-to the default tab ("Related Changes").
+If a change from the 'Same Topic' tab was clicked, the selected tab would reset
+to the default tab ('Related Changes').
Side-By-Side Diff
@@ -494,7 +563,7 @@
* Fix alignment of checkboxes on project access screen.
+
-The "Exclusive" checkbox was not aligned with the other checkboxes.
+The 'Exclusive' checkbox was not aligned with the other checkboxes.
REST API
~~~~~~~~
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java
index 2fb0e49..f1a57a5 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/change/ChangeScreen2.java
@@ -494,7 +494,7 @@
}
if (rev.is_edit()) {
- if (isEditBasedOnCurrentPatchSet(info)) {
+ if (info.hasEditBasedOnCurrentPatchSet()) {
publishEdit.setVisible(true);
} else {
rebaseEdit.setVisible(true);
@@ -515,13 +515,6 @@
info.revisions().values());
}
- private boolean isEditBasedOnCurrentPatchSet(ChangeInfo info) {
- JsArray<RevisionInfo> revList = info.revisions().values();
- RevisionInfo.sortRevisionInfoByNumber(revList);
- int currentPatchSetOrEdit = revList.get(revList.length() - 1)._number();
- return currentPatchSetOrEdit == 0;
- }
-
@UiHandler("publishEdit")
void onPublishEdit(@SuppressWarnings("unused") ClickEvent e) {
EditActions.publishEdit(changeId);
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfo.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfo.java
index a9dec39..fff792f 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfo.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeInfo.java
@@ -62,6 +62,12 @@
return ts;
}
+ public final boolean hasEditBasedOnCurrentPatchSet() {
+ JsArray<RevisionInfo> revList = revisions().values();
+ RevisionInfo.sortRevisionInfoByNumber(revList);
+ return revList.get(revList.length() - 1).is_edit();
+ }
+
private final native Timestamp _get_cts() /*-{ return this._cts; }-*/;
private final native void _set_cts(Timestamp ts) /*-{ this._cts = ts; }-*/;
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 5fd8fa2..1c4829c 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
@@ -1217,7 +1217,6 @@
.parentsTable {
border-style: none;
- border: 1px 1px 1px 0px;
outline: 0px;
padding: 0px;
border-spacing: 0px;