1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

In commit history list view, show all commits

Summary:
Currently, the last group of commits is not shown in the list view because the final `$list` is never added to `$view`.

For example, if the first page would contain commits from "April 7", "April 6", and "April 5", commits from "April 5" are not shown.

(If a repository has 100 commits in a single day, nothing is shown.)

On this server, here's the bottom of page 1:

{F4987087}

Here's the top of page 2:

{F4987088}

However, here's `git log` between those commits:

```
$ git log --oneline 7e46^..5f49f
5f49f9c793 Add sound to logged out Conpherence
1644b45050 Disperse task subpriorities in blocks
c6a7bcfe89 Make Pholio description behave as a remarkup field (e.g., subscribe mentioned users)
bbc5f79227 Make membership lock/unlock feed stories read more naturally
789d57522b Make editing project images redirect to "Manage" more consistently
10b3879232 Make Project slug/hashtag transactions render a little more nicely
abd791889c Update Maniphest title transaction again
5a34b299e4 Update Maniphest title language
601622013d Clarify milestone/subproject creation language
c9889e3d55 Fix an issue in Phriction where moving a document just copied it instead
fdf00f6df4 Clean up some minor UI behaviors in Differential
6c46f27d98 Add quest objectives to the minimap
d783299a19 Fix Phriction status not set property on new document
93e28da76e Add more "disabled" UI to PHUIObjectItemView
7e46d7ab6a Migrate Project color to modular transactions
```

This group of commits does not currently appear anywhere in the list.

Test Plan: Viewed a page of commits, saw 100 commits.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D18066
This commit is contained in:
epriestley 2017-06-02 04:37:11 -07:00
parent d42d69aef6
commit 335c3a7d12

View file

@ -26,19 +26,12 @@ final class DiffusionHistoryListView extends DiffusionHistoryView {
$rows = array();
$ii = 0;
$cur_date = 0;
$list = null;
$header = null;
$view = array();
foreach ($this->getHistory() as $history) {
$epoch = $history->getEpoch();
$new_date = date('Ymd', $history->getEpoch());
if ($cur_date != $new_date) {
if ($list) {
$view[] = id(new PHUIObjectBoxView())
->setHeader($header)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($list);
}
$date = ucfirst(
phabricator_relative_date($history->getEpoch(), $viewer));
$header = id(new PHUIHeaderView())
@ -46,6 +39,11 @@ final class DiffusionHistoryListView extends DiffusionHistoryView {
$list = id(new PHUIObjectItemListView())
->setFlush(true)
->addClass('diffusion-history-list');
$view[] = id(new PHUIObjectBoxView())
->setHeader($header)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($list);
}
if ($epoch) {