From 1d4de002928445a5da3c643c00978075e9c89d62 Mon Sep 17 00:00:00 2001 From: Chris Manghane Date: Mon, 7 Oct 2013 09:06:32 -0700 Subject: [PATCH] go.tools/dashboard: clone main repo from local path if it already exists locally. R=adg, minux.ma CC=golang-dev https://golang.org/cl/14462049 --- dashboard/builder/vcs.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dashboard/builder/vcs.go b/dashboard/builder/vcs.go index 02ea7b75..dc0057aa 100644 --- a/dashboard/builder/vcs.go +++ b/dashboard/builder/vcs.go @@ -41,7 +41,12 @@ func (r *Repo) Clone(path, rev string) (*Repo, error) { defer r.Unlock() err := timeout(*cmdTimeout, func() error { - err := r.Master.VCS.CreateAtRev(path, r.Master.Repo, rev) + downloadPath := r.Path + if !r.Exists() { + downloadPath = r.Master.Repo + } + + err := r.Master.VCS.CreateAtRev(path, downloadPath, rev) if err != nil { return err }