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: implement modfetch/hgrepo #25074

Closed
rsc opened this issue Apr 25, 2018 · 2 comments
Closed

x/vgo: implement modfetch/hgrepo #25074

rsc opened this issue Apr 25, 2018 · 2 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Apr 25, 2018

Added modfetch/gitrepo. Now we need modfetch/hgrepo too.

@rsc rsc added this to the vgo milestone Apr 25, 2018
@rsc
Copy link
Contributor Author

rsc commented Apr 25, 2018

Notes from a few weeks ago below.
Hg does not allow the kind of limited remote access that git does,
so probably everything has to start by cloning the entire repo.

package hgrepo

func (r *repo) Tags(prefix string) ([]string, error) {
	hg tags 
}

func (r *repo) Stat(rev string) (*codehost.RevInfo, error) {
	hg log -l1 -r 371bbd396033
}

func (r *repo) ReadFile(rev, file string, maxSize int64) ([]byte, error) {
	hg cat -r rev file
}

func (r *repo) ReadZip(rev, file string, maxSize int64) (zip io.ReadCloser, actualSubdir string, err error) {
	hg archive --no-decode -r rev x.zip
}

func (r *repo) LatestAt(t time.Time, branch string) ([]byte, error) {
	hg log -l1 -d '<2017-01-01T00:00:00Z'
}

@rsc
Copy link
Contributor Author

rsc commented Jul 5, 2018

This is done.

@rsc rsc closed this as completed Jul 5, 2018
@golang golang locked and limited conversation to collaborators Jul 6, 2019
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

2 participants