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

Subversion: fix empty "Authored on" date on commit pages

Summary:
Subversion does not allow to have local commits. So, manage this case.

Closes T15612

Test Plan:
Surf a git commit: nothing changed.

Surf a svn commit: the "Authored on" date is not empty anymore.

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15612

Differential Revision: https://we.phorge.it/D25796
This commit is contained in:
Valerio Bozzolan 2024-08-24 15:34:06 +02:00
parent 3c5e43cccb
commit b02615bd50

View file

@ -624,6 +624,13 @@ final class DiffusionCommitController extends DiffusionController {
$author_view = $commit->newCommitAuthorView($viewer);
if ($author_view) {
$author_date = $data->getAuthorEpoch();
// Add support to Subversion commits that only have one date,
// since in SVN you cannot prepare local commits to push them later.
if ($author_date === null) {
$author_date = $commit->getEpoch();
}
$author_date = phabricator_datetime($author_date, $viewer);
$provenance_list->addItem(