Page MenuHomePhabricator

Make repository URIs slightly prettier
Closed, ResolvedPublic

"Like" token, awarded by 20after4."Love" token, awarded by clloos."Mountain of Wealth" token, awarded by nemobis."Like" token, awarded by avivey."Like" token, awarded by techdragon."Like" token, awarded by witrin."Like" token, awarded by vinzent."The World Burns" token, awarded by joshuaspence."Like" token, awarded by allanb.
Assigned To
Authored By
wills, Dec 16 2013


Once, repositories needed to have callsigns. They no longer do; callsigns are now optional.

Currently, repositories with no callsign get ID-based URIs like /diffusion/123/. This doesn't cause any concrete issues, but it would be nice to offer more human-readable URIs based on the "Short Name" instead, which would look like /source/repository-short-name/.


Differential Revisions
D14483: Start working on making callsigns optional
D17637 / rP9856802ba22e: Disallow /source/ in robots.txt
D16851 / rP6a62fca95093: Support slightly prettier repository URIs in Diffusion
D15472 / rARC3d7ac867f538: Make callsigns optional in arcanist
D15344 / rP5b9d8aeae701: Fix two issues with callsign-free repositories
D15305 / rPdc7d0b4a56d8: Make repository callsigns optional
D15304 / rPdfc8f8bcb465: Make callsigns editable on repository basic information
D15303 / rPb63eb09cacf1: Don't require a callsign to set a repository's local path
D15302 / rP74a79aa634ef: Make serving repositories work with alternate URIs
D15301 / rPc2b8dd28d885: Support ID-based repository URIs, and canonicalize repository URIs
D15300 / rP78fba426f661: Update import/clear symbols scripts for callsigns
D15296 / rP097bcb397061: Make `bin/diviner generate --repository <repository>` accept identifiers
D15295 / rP93d7b0122252: Remove uncalled DiffusionRequest->getCallsign()
D15294 / rP925a0d3d5918: Pass repository PHID to custom hooks in PHABRICATOR_REPOSITORY instead of…
D15293 / rP973b8ace8616: Remove dependence on callsigns from `bin/commit-hook`
D15049 / rPba2215986639: (stable) Fix two issues with repository monogram regular expressions
D15049 / rP155cb1d2c5a8: Fix two issues with repository monogram regular expressions
D14990 / rPb848ab87b3d5: Introduce "local names" for commits
D14989 / rP96ebd358240f: Change repository "Clone/Checkout As" to "Short Name"
D14988 / rPa06715ccdddc: Allow repository short names to be used as identifiers
D14949 / rPf9a5cd2bbd86: Fix all remaining weird Diffusion request processing
D14948 / rP38f2008e68b4: Modernize Diffusion lint controllers
D14947 / rP3cbc239bc640: Modernize most somewhat-weird Diffusion controllers
D14945 / rP649f8827205a: Slightly modernize all Diffusion edit endpoints
D14944 / rP2bfc5ff92ec2: Modernize more Diffusion controllers
D14942 / rP8b6edaa4e238: Merge and modernize Browse controllers in Diffusion
D14941 / rP7de17fb75ec3: Modernize tag and branch controllers in Diffusion
D14940 / rPfb3b4ee532ac: Make CommitController more flexible about handling URIs
D14937 / rP07e2596aa14c: Move generateDiffusionURI() into PhabricatorRepository
D14933 / rPbcfd6bdd81ee: Move various other callsites away from callsigns
D14932 / rP9febfb26a08d: Convert `diffusion.looksoon` to use repository identifiers instead of callsigns
D14931 / rPbe5b89687e37: Separate external editor integration from callsigns
D14930 / rPb1388c5ca157: Remove `diffusion.getcommits` Conduit API method
D14929 / rP35e7a1f3c073: Continue reducing callers to getCallsign()
D14928 / rP9d84eb4c747d: Allow Conduit API methods in Diffusion to accept any repository identifier
D14927 / rP37532a0bf001: Remove various additional calls to getCallsign()
D14926 / rPd9e034f02ca0: Remove calls to getCallsign() from repository daemons
D14924 / rPedcc3232aabc: Remove calls to getCallsign() in bin/repository scripts
D14923 / rPff1bfb64dd56: Reduce the total number of calls to getCallsign()
D11050 / rPf33e2de09286: make repo callsigns optional

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
elesh added a subscriber: elesh.Jan 29 2016, 7:13 AM
epriestley moved this task from vNext to v3 on the Diffusion board.Feb 16 2016, 9:50 PM
epriestley edited projects, added Diffusion (v3); removed Diffusion.

For repositories with a short name like "codebase", I imagine users would prefer /diffusion/codebase/ over /diffusion/123/ as the canonical URI.

However, we can't easily do this because it conflicts with other existing URIs like /diffusion/new/, /diffusion/inline/, /diffusion/lint/, /diffusion/query/, etc.

I can either move all of the non-repository Diffusion services to some new URI or put canonical repository short names under a different base URI. I'm inclined to do the latter, and use /source/ as the base, so a repository with short name "codebase" would have canonical URI /source/codebase/. If you strongly object to this, you have, like, a couple of hours to complain, unless this turns out to be trickier than I think.

D15302 was the change I was most worried about here, and it seems to have been entirely straightforward. I now expect to move forward like this:

  • Make callsigns optional.
  • Do a large amount of adjacent work untangling all the "we want our repository to have 30 different URIs, some of which only work on Tuesdays" use cases (T10366, T7516, T5406, T4705). This may be several days of work.
  • Add the new "Short Name"-based display URIs (/source/codebase/ instead of /diffusion/123/).
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Feb 18 2016, 6:29 PM
r0bbie added a subscriber: r0bbie.Mar 15 2016, 1:31 PM
holmboe added a subscriber: holmboe.Apr 5 2016, 9:37 AM
RonnieR added a subscriber: RonnieR.Apr 6 2016, 2:30 AM
fcoelho added a subscriber: fcoelho.Apr 6 2016, 8:24 PM
epriestley renamed this task from Make repository callsigns optional or more flexible to Make repository URIs slightly prettier.May 12 2016, 1:06 AM
epriestley updated the task description. (Show Details)

Callsigns have been optional for some time (roughly since D15305 in February 2016, although there were a trickle of bugs after that).

URIs as a whole have been generalized and made more flexible in connection with T10366. The documentation on callsigns has been updated in connection with T10748.

Remaining work here is to make /source/repository-short-name/ ("Short Name URIs") work to access a repository, as an addition to /diffusion/123/ ("ID URIs") and /diffusion/XYZ/ ("Callsign URIs"). Most of the groundwork for this is in place, but the benefit is a minor cosmetic one.

Today, short names can be used to identify repositories in a number of other contexts, like bin/repository workflows.

eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.May 13 2016, 6:03 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Jul 4 2016, 9:06 PM
scode added a subscriber: scode.Aug 4 2016, 11:32 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 5 2016, 4:40 PM

Shortname is already used for the shortname.git portion of the URI. Would it be out of the question to allow a separate path to be configured, perhaps also including nested directories?

The use case is mirroring something like an Android distribution, where the original source has repositories organised into a logical hierarchy, and is often using repo to fetch the full collection of repositories at once.

Currently to put repositories under Phabricator, I need to go through and edit the path of each individual repostory in the repo manifest, but if the path could be more flexible on the Phabricator side, I could just edit the default remote, and keep the relative paths below that the same.

How would we distinguish between source/android/browse/carafe/ being "browse branch carafe of repository android" vs "browse the home page of repository carafe located at path android/browse/" in such a scheme?

How difficult would this be for someone to implement / does upstream have an implementation timeline for this?

HuMMeL621 moved this task from Backlog to Preflight on the Prioritized board.Sep 8 2016, 8:08 AM
HuMMeL621 moved this task from Preflight to Backlog on the Prioritized board.
epriestley moved this task from Backlog to The Queue on the Prioritized board.Nov 13 2016, 8:29 PM

It's entirely possible I missed some things in supporting the 25,000 different URI forms we now support, but just file a new issue if you run into anything since this task is now 200 years old with seventy pages of unrelated disucssion.

urzds added a subscriber: urzds.Jul 12 2017, 11:15 AM