@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

In Subversion, show "svn checkout <uri> <directory>" in Diffusion

Summary:
Ref T10923. The old behavior was to show a full command in SVN, Mercurial, and Git, like this:

- `git clone <uri>`
- `hg clone <uri>`
- `svn checkout <uri> <directory>`

In Git and Mercurial, the `<uri>` ends in something like `/nice-repository-name.git` so the default directory it creates is called `nice-repository-name/`.

In Subversion, we don't (and can't easily) do that for various reasons so we provide an explicit `<directory>` with the nice name.

In the update, I've changed things to just show the URI. I often found that I wanted the URI alone, not the whole clone command (for example, to `fetch`, `remote-add`, etc). This is also consistent with GitHub. Because we have nice URIs for Git and Mercurial, `git clone <uri>` has good behavior.

In Subversion, `svn checkout <uri>` has bad beahvior (you get a directory named `47/` or whatever). So continue showing the whole command there.

We can possibly tailor this after T4245 finishes up and we get access to `/source/nice-repository-name/` URIs.

Test Plan:
- Viewed a Subversion repository, saw a full command.
- Viewed a Git repository, saw only a clone URI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10923

Differential Revision: https://secure.phabricator.com/D15888

+10 -1
+10 -1
src/applications/diffusion/controller/DiffusionRepositoryController.php
··· 671 671 672 672 require_celerity_resource('diffusion-icons-css'); 673 673 674 - $display = (string)csprintf('%R', (string)$uri->getDisplayURI()); 674 + if ($repository->isSVN()) { 675 + $display = csprintf( 676 + 'svn checkout %R %R', 677 + (string)$uri->getDisplayURI(), 678 + $repository->getCloneName()); 679 + } else { 680 + $display = csprintf('%R', (string)$uri->getDisplayURI()); 681 + } 682 + 683 + $display = (string)$display; 675 684 676 685 $input = javelin_tag( 677 686 'input',