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

x/vgo: support hg and possibly hgweb.cgi #25977

Closed
msackman opened this issue Jun 20, 2018 · 1 comment

Comments

@msackman
Copy link

commented Jun 20, 2018

What version of Go are you using (go version)?

vgo version
go version go1.10.1 linux/amd64 vgo:2018-02-20.1

What operating system and processor architecture are you using (go env)?

vgo env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/matthew/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/matthew/src/Go_external_1.10.1"
GOPROXY=""
GORACE=""
GOROOT="/home/matthew/src/golang/go1.10.1"
GOTMPDIR=""
GOTOOLDIR="/home/matthew/src/golang/go1.10.1/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build416094540=/tmp/go-build -gno-record-gcc-switches"
VGOMODROOT="/home/matthew/tmp/foo"

What did you do?

mkdir -p tmp/foo
cd !!$
echo 'module foo' > go.mod
vgo get goshawkdb.io/common

What did you expect to see?

vgo: finding goshawkdb.io/common v1.0.0

What did you see instead?

vgo get goshawkdb.io/common: unknown VCS, Repo: hg, https://src.goshawkdb.io/common

Now, this works fine with normal go get and the meta header is there correctly:

curl https://goshawkdb.io/common

<html>
<head>
<meta name="go-import" content="goshawkdb.io/common hg https://src.goshawkdb.io/common"/>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>
</html>

I suspect this may be classed as a dupe of #25074 but that issue isn't enormously clear to me ;)

The other thing worth pointing out is that hgweb.cgi is probably the most common way of putting an http interface on hg repos. https://www.mercurial-scm.org/wiki/HgWebDirStepByStep an example of which is https://src.goshawkdb.io/common Note that this does provide tags (https://src.goshawkdb.io/common/tags and even rss: https://src.goshawkdb.io/common/rss-tags) and features such as tarballs of specific tags (eg https://src.goshawkdb.io/common/archive/goshawkdb_0.3.1.tar.gz) and even revisions (eg https://src.goshawkdb.io/common/archive/458b975cb054.tar.gz). Point is, you don't have to fall back to cloning the whole repo if you can detect that you're talking to hgweb.cgi

@gopherbot gopherbot added this to the vgo milestone Jun 20, 2018

@msackman msackman changed the title x/vgo: support hg and possibly mercurial-server x/vgo: support hg and possibly hgweb.cgi Jun 20, 2018

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 20, 2018

I suspect this may be classed as a dupe of #25074 but that issue isn't enormously clear to me ;)

Yep, I think it is. Russ is working on a number of fixes to vgo get this week, so hopefully this will get better soon.

@bcmills bcmills closed this Jun 20, 2018

@golang golang locked and limited conversation to collaborators Jun 20, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.