Page MenuHomePhorge

Missing "Authored on" commit date for Subversion commits
Closed, ResolvedPublic

Description

If you browse a subversion repository history and open a commit, some commit information are missing as illustrated below :

screenshot-phorge-bug-commit-data-1.png (208ร—1 px, 28 KB)

screenshot-phorge-bug-commit-data-2.png (318ร—1 px, 30 KB)

Here is what I can say :

  • Phorge doesn't manage repository (it is only observing it)
  • All my subversion repositories seems affected
  • The issue is also here with older version of PHP (tested with 7.4)
  • Git repositories are not affected
  • Phorge is able to get commits date since it is able to indicate it on first screenshot

Let me know if you need any additional information.

Related Objects

Event Timeline

Is this only related to the "Authored on ..." field, as far as you can see?

I can reproduce this, on an hosted Subversion repository.

This is becoming quite frustrating in my workplace in Torino. Let's start immersion mode.

The "Authored On" field is rendered here:

https://we.phorge.it/source/phorge/browse/master/src/applications/diffusion/controller/DiffusionCommitController.php;9f07e5083dfa523c81126c0edf67a3360906b74a$632

It seems some lines above, the "author epoque" from PhabricatorRepositoryCommitData#getAuthorEpoque() is always empty for SVN, while it's populated correctly for git.

https://we.phorge.it/source/phorge/browse/master/src/applications/diffusion/controller/DiffusionCommitController.php;9f07e5083dfa523c81126c0edf67a3360906b74a$626

Now. Surprisingly: the hovercard, instead, already works! and it already shows the date correctly ๐Ÿค”

image.png (154ร—402 px, 16 KB)

So. Probably the hovercard has correct business logic. Let's see its logic:

https://we.phorge.it/source/phorge/browse/master/src/applications/diffusion/engineextension/DiffusionHovercardEngineExtension.php;9f07e5083dfa523c81126c0edf67a3360906b74a

So the hovercard reads the commit date from PhabricatorRepositoryCommit#getEpoch().

So... gotcha \o/ We have found the root cause:

  • PhabricatorRepositoryCommitData#getAuthorEpoque() - this does not work in SVN
  • PhabricatorRepositoryCommit#getEpoch() - this works in SVN and in git

In short:

Git has two dates (author date - "when was the commit pushed", and commit date "when was the commit committed")

SVN, instead, has just the "commit date" (not the author date).

So, instead of just showing the author date (that can be NULL in SVN), we should introduce a fallback on the commit date, to make both git users and SVN users and future esoteric SVCs happy.

aklapper renamed this task from Missing subversion commit information to Missing "Authored on" commit date for Subversion commits.Aug 23 2024, 18:30