Page MenuHomePhabricator

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

Authored by epriestley on Dec 2 2016, 2:22 PM.
Tags
None
Referenced Files
F15539218: D16976.diff
Fri, Apr 25, 12:12 AM
F15505278: D16976.diff
Tue, Apr 15, 1:32 AM
F15491039: D16976.diff
Fri, Apr 11, 10:45 PM
F15464637: D16976.id40848.diff
Wed, Apr 2, 11:40 AM
F15450817: D16976.id40850.diff
Fri, Mar 28, 6:23 PM
F15447286: D16976.id.diff
Thu, Mar 27, 10:55 PM
F15439250: D16976.diff
Wed, Mar 26, 6:34 AM
F15420124: D16976.id.diff
Mar 21 2025, 11:32 AM
Subscribers
None

Details

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!

Diff Detail

Repository
rP Phabricator
Branch
gitclone1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 14733
Build 19254: Run Core Tests
Build 19253: arc lint + arc unit

Event Timeline

epriestley retitled this revision from to Improve error messages for running `git clone` against a Mercurial repository.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 2 2016, 3:25 PM
This revision was automatically updated to reflect the committed changes.