Page MenuHomePhabricator

Add a "/source/..." URI for Diffusion commits which redirects
ClosedPublic

Authored by epriestley on Oct 3 2017, 7:52 PM.
Tags
None
Referenced Files
F19056152: D18676.id.diff
Fri, Nov 28, 7:09 PM
F19025968: D18676.id.diff
Mon, Nov 24, 9:14 AM
F19022952: D18676.id44834.diff
Sun, Nov 23, 10:34 PM
F19021021: D18676.id44834.diff
Sun, Nov 23, 6:44 PM
F19017508: D18676.diff
Sun, Nov 23, 8:17 AM
F18846783: D18676.diff
Oct 29 2025, 9:07 PM
F18836159: D18676.id44834.diff
Oct 26 2025, 10:50 PM
F18833927: D18676.id44836.diff
Oct 26 2025, 6:44 AM
Subscribers
None

Details

Summary

See PHI112. The install presumably wants to generate links to Diffusion commits from an external tool, but only knows the short name of the repository.

Provide a /source/phabricator/commit/abcdef908273 URI which redirects to the canonical URI for the commit.

Test Plan
  • Visited /source/ URI for a commit, got a redirect.
  • Visited normal URI for a commit, got a commit page.
  • Visited /branches/ and /tags/ for a /source/ repository, got proper pages.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Just out of curiosity, what happens if a commit identifier collides with more than one commit hash?

This revision is now accepted and ready to land.Oct 3 2017, 8:05 PM

Hmm.. bad stuff, but pre-existing bad stuff:

$ git log --oneline --format=%H | cut -c1-6 | sort | uniq -c | sort -n
...
   2 bd3c23

Yields this:

https://secure.phabricator.com/rPbd3c23

...which fatals, probably on executeOne().

Expected a single result!

Better behavior would be to execute(), then special case for multiple results.

This revision was automatically updated to reflect the committed changes.