Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go get cannot handle custom repository URLs specified using ".hg" importpath suffix #5495

Closed
gopherbot opened this issue May 17, 2013 · 12 comments

Comments

@gopherbot
Copy link

by czapkofan:

What steps will reproduce the problem?
1. hg init foobar
2. cd foobar
3. hg serve --daemon --port 80 --prefix foobar --pid-file ../foobar.pid
4. cd ..
5. hg clone -U http://127.0.0.1/foobar foobar2
6. go get 127.0.0.1/foobar.hg

What is the expected output?
(no errors during download)

What do you see instead?
# cd .; hg clone -U 127.0.0.1/foobar c:\gopath\src\127.0.0.1\foobar.hg
abort: repository 127.0.0.1/foobar not found!
package 127.0.0.1/foobar.hg: exit status 255

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?
Windows 7

Which version are you using?  (run 'go version')
go version go1.1 windows/amd64

Please provide any additional information below.
AFAIK, Mercurial requires a schema (http://) in the cloned URL, otherwise it assumes
this is a local filesystem path.
@gopherbot
Copy link
Author

Comment 1 by czapkofan:

The step 5. was provided to prove that Mercurial succeeds to clone the repo when the URL
is specified properly.

@minux
Copy link
Member

minux commented May 17, 2013

Comment 2:

not sure how to detect which scheme to use for this case.

@gopherbot
Copy link
Author

Comment 3 by czapkofan:

The docs for go get at http://golang.org/cmd/go/#hdr-Remote_import_path_syntax state:
"When a version control system supports multiple protocols, each is tried in turn when
downloading. For example, a Git download tries git://, then https://, then http://."
So for Mercurial, I'd personally expect https://, then http://, per analogy, no?

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 4:

Labels changed: added priority-later, go1.2maybe, removed priority-triage.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 5:

Labels changed: added feature.

@robpike
Copy link
Contributor

robpike commented Aug 30, 2013

Comment 6:

Not for 1.2.

Labels changed: removed go1.2maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 7:

Labels changed: added go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 8:

Labels changed: removed feature.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 9:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 10:

Labels changed: added repo-main.

@evankroske
Copy link

Comment 11:

Can't reproduce. I think it has been fixed.

@ianlancetaylor
Copy link
Contributor

Closing based on previous comment. Please reopen if not fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants