Page MenuHomePhabricator

Make repository URIs slightly prettier
Closed, ResolvedPublic

Assigned To
Authored By
wills
Dec 16 2013, 10:43 PM
Referenced Files
F1119249: images-3.jpg
Feb 19 2016, 3:54 AM
F135341: Screen_Shot_2014-03-27_at_4.06.26_PM.png
Mar 27 2014, 11:16 PM
Tokens
"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.

Description

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/.

Revisions and Commits

Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision
Restricted Differential Revision

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
epriestley added a revision: Restricted Differential Revision.Jan 11 2016, 10:30 AM
epriestley added a revision: Restricted Differential Revision.Jan 11 2016, 10:52 AM
epriestley added a commit: Restricted Diffusion Commit.Jan 11 2016, 5:17 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a revision: Restricted Differential Revision.Jan 18 2016, 5:36 PM
epriestley added a commit: Restricted Diffusion Commit.Jan 18 2016, 5:46 PM
epriestley added a commit: Restricted Diffusion Commit.Jan 20 2016, 12:26 PM
epriestley edited projects, added Diffusion (v3); removed Diffusion.
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 12:46 AM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 12:50 AM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:06 AM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 1:10 AM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:15 AM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 1:17 AM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:21 AM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 1:23 AM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 11:13 AM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 12:22 PM

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.

epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:11 PM

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/).
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:29 PM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 1:57 PM
epriestley added a revision: Restricted Differential Revision.Feb 18 2016, 2:20 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 5:56 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 6:06 PM
eadler moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Feb 18 2016, 6:29 PM
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 6:33 PM
epriestley added a commit: Restricted Diffusion Commit.
epriestley added a commit: Restricted Diffusion Commit.Feb 18 2016, 6:36 PM
epriestley added a revision: Restricted Differential Revision.Feb 25 2016, 11:09 AM
epriestley added a commit: Restricted Diffusion Commit.Feb 26 2016, 2:13 PM
avivey added a revision: Restricted Differential Revision.Mar 15 2016, 12:40 AM
avivey added a commit: Restricted Diffusion Commit.Mar 15 2016, 3:58 AM
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
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 Preflight to Backlog on the Prioritized board.
epriestley added a revision: Restricted Differential Revision.Nov 13 2016, 8:02 PM
epriestley closed this task as Resolved by committing Restricted Diffusion Commit.Nov 13 2016, 8:42 PM
epriestley added a commit: Restricted Diffusion Commit.

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.

epriestley added a revision: Restricted Differential Revision.Apr 6 2017, 10:53 PM
epriestley added a commit: Restricted Diffusion Commit.Apr 6 2017, 11:28 PM