Page MenuHomePhabricator

Support slightly prettier repository URIs in Diffusion
ClosedPublic

Authored by epriestley on Nov 13 2016, 8:02 PM.
Tags
None
Referenced Files
F14056992: D16851.diff
Sat, Nov 16, 11:55 PM
F14042780: D16851.diff
Tue, Nov 12, 5:58 AM
F14027098: D16851.id40579.diff
Fri, Nov 8, 5:07 AM
F14017289: D16851.id40579.diff
Mon, Nov 4, 4:13 PM
F13994034: D16851.id40582.diff
Wed, Oct 23, 3:16 AM
F13980230: D16851.diff
Oct 19 2024, 9:10 AM
F13979415: D16851.id40579.diff
Oct 19 2024, 4:22 AM
F13966397: D16851.id40582.diff
Oct 16 2024, 7:54 AM
Subscribers

Details

Summary

Fixes T4245. When a repository has a short name, use /source/shortname/ as its primary URI.

Test Plan
  • Cloned Git repositories from shortnames via HTTP and SSH.
  • Cloned Mercurial repositories from shortnames via HTTP and SSH.
  • Cloned Subversion repositories from shortnames via SSH.
  • Browsed Git, Mercurial and Subversion repositories.
  • Added and removed short names to various repositories.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Support slightly prettier repository URIs in Diffusion.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
chad added inline comments.
src/applications/diffusion/controller/DiffusionLastModifiedController.php
19

imgres.jpg (168×300 px, 6 KB)

This revision is now accepted and ready to land.Nov 13 2016, 8:40 PM
src/applications/diffusion/controller/DiffusionLastModifiedController.php
19

o i c

This revision was automatically updated to reflect the committed changes.

We default "short name" to a mangled version of the repository name, which is often "good enough" (looks like all repos here don't have short-name explicitly set), but we don't consider it a "short name" for this feature.

Right now, a few of my repos (The ones with the confusing names) show the /source/short-name.git, and most show /diffusion/<id>/short-name.git, which I suspect would ends up confusing for users.

We don't consider the "clone name" to be a "short name" for the purposes of this feature because it is not guaranteed to be unique (many different names mangle down to the same "clone name", and repositories are not required to have unique names in the first place).

Ahh, that makes sense.
The UI is a little confusing around this though, because it refers to both "clone name" and "repository slug" as "short name" in the manage page; I'll try to break that up a bit?

Short Name: none
Clone As: yellow-fruit (Automatic clone name)
Short Name: green-tomatoes
Clone As: green-tomatoes (Short name)

Maybe just remove "Clone As" completely? e.g., only show:

Short Name: the-short-name

...or:

Short Name: None (or just don't show anything idk)