From a6ac5386f34859c470a84873d1949c641c48dbdd Mon Sep 17 00:00:00 2001 From: Chris Manghane Date: Mon, 23 Sep 2013 17:18:31 -0700 Subject: [PATCH] go.tools/dashboard: fix Repo creation in buildSubRepo to have valid Master repo. R=golang-dev, adg CC=golang-dev https://golang.org/cl/13568047 --- builder/main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builder/main.go b/builder/main.go index b9386b87..404d0595 100644 --- a/builder/main.go +++ b/builder/main.go @@ -426,7 +426,14 @@ func (b *Builder) buildSubrepo(goRoot, goPath, pkg, hash string) (string, error) } // hg update to the specified hash - repo := Repo{Path: filepath.Join(goPath, "src", pkg)} + pkgmaster, err := vcs.RepoRootForImportPath(pkg, *verbose) + if err != nil { + return "", fmt.Errorf("Error finding subrepo (%s): %s", pkg, err) + } + repo := &Repo{ + Path: filepath.Join(goPath, "src", pkg), + Master: pkgmaster, + } if err := repo.UpdateTo(hash); err != nil { return "", err }