From 306ed3cb52925f3d0b229199e731e0e3ebe8f698 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 20 Jul 2014 08:58:28 +0300 Subject: [PATCH] Display parents for all changes, not only merge commits Bug: issue 2279 Change-Id: Iab4930b53e7968f2d6ae1e874b4b474004b4557b --- Documentation/user-review-ui.txt | 5 ++--- .../main/java/com/google/gerrit/client/change/CommitBox.java | 2 +- .../java/com/google/gerrit/client/change/CommitBox.ui.xml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Documentation/user-review-ui.txt b/Documentation/user-review-ui.txt index 87f85efc04..40df914d90 100644 --- a/Documentation/user-review-ui.txt +++ b/Documentation/user-review-ui.txt @@ -98,7 +98,7 @@ It displays the author and the committer as links to a list of this person's changes that have the same status as the currently viewed change. -The commit ID and the link:user-changeid.html[Change-Id] are both +The commit ID, the parent commit(s) and the link:user-changeid.html[Change-Id] are displayed with a copy-to-clipboard icon that allows the ID to be copied into the clipboard. @@ -107,8 +107,7 @@ 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. +If a merge commit is viewed this is highlighted by an icon. 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"] 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 49f064ed98..443b31bc38 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 @@ -122,8 +122,8 @@ class CommitBox extends Composite { if (revInfo.commit().parents().length() > 1) { mergeCommit.setVisible(true); - setParents(change.project(), revInfo.commit().parents()); } + setParents(change.project(), revInfo.commit().parents()); } private void setParents(String project, JsArray commits) { 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 0289428ec8..b0897cbc37 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 @@ -139,7 +139,7 @@ limitations under the License. - Parents + Parent(s)