Homec4science

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

Authored by epriestley <git@epriestley.com> on May 11 2016, 16:22.

Description

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

Details

Committed
epriestley <git@epriestley.com>May 11 2016, 18:20
Pushed
aubortJan 31 2017, 17:16
Parents
rPH5587d97a7f0c: Tailor Diffusion protocol rules slightly
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH6615d76c3489: In Subversion, show "svn checkout <uri> <directory>" in Diffusion (authored by epriestley <git@epriestley.com>).May 11 2016, 18:20