Homec4science

Improve error messages for running `git clone` against a Mercurial repository

Authored by epriestley <git@epriestley.com> on Dec 2 2016, 15:20.

Description

Improve error messages for running git clone against a Mercurial repository

Summary:
Fixes T11938.

Note that there's a subcase here: if you hg clone or svn checkout a short /source/ URI that ends in .git, we miss the lookup and don't get this far, so you still get a generic error message.

Hopefully it is clear enough on its own that proto://.../blah.git is, in fact, a Git repository, since it says ".git" at the end.

If that doesn't prove to be true, we can be more surgical about this.

Test Plan:

$ git clone ssh://local@localvault.phacility.com/source/quack.notgit/
Cloning into 'quack.notgit'...
phabricator-ssh-exec: This repository ("quack.notgit") is not a Git repository. Use "hg" to interact with this repository.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
$ hg clone ssh://local@localvault.phacility.com/source/phabx
remote: phabricator-ssh-exec: This repository ("phabx") is not a Mercurial repository. Use "git" to interact with this repository.
abort: no suitable response from remote hg!

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11938

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

Details

Committed
epriestley <git@epriestley.com>Dec 2 2016, 16:30
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7c37377e0d61: Set the viewer timezone properly on Calendar event RecurrenceSet objects
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHfaf983614cd5: Improve error messages for running `git clone` against a Mercurial repository (authored by epriestley <git@epriestley.com>).Dec 2 2016, 16:30