Page MenuHomeFreeBSD

Add infrastructure for links to Git commits.
ClosedPublic

Authored by jhb on Dec 21 2020, 7:12 PM.

Details

Summary
  • Add a <githash> tag which accepts a Git hash. Leave <revnumber> as is for svn revisions. In theory we could add a new attribute to <revnumber> to say which VCS to use, but this would require tagging either all SVN revisions or all Git hashes explicitly which would be invasive. A new tag going forward seems simpler.
  • Revert svnweb.link back to generating svnweb links. This fixes all the explicit <revnumber>'s referring to SVN src commits in existing documentation.
  • Add a cgit.link which links to a Git commit in cgit. githash generates cgit.link's when asked to generate a href.

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jhb requested review of this revision.Dec 21 2020, 7:12 PM
jhb created this revision.
This revision is now accepted and ready to land.Dec 22 2020, 5:58 PM
gjb requested changes to this revision.Dec 22 2020, 6:18 PM

I noticed the output is empty. I'll look into what is going on and let you know.

This revision now requires changes to proceed.Dec 22 2020, 6:18 PM
  • Fix wrong select for githash revision.

This now works for me when adding some test <githash> entries to porters-handbook/versions/chapter.xml.

This revision is now accepted and ready to land.Dec 22 2020, 7:07 PM

looks good to the extent of my knowledge of this

  • Add styling for gitref.
This revision now requires review to proceed.Dec 22 2020, 7:16 PM
This revision is now accepted and ready to land.Dec 22 2020, 7:37 PM
This revision was automatically updated to reflect the committed changes.