1
0
mirror of https://github.com/golang/go synced 2024-11-18 18:34:40 -07:00

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
This commit is contained in:
Chris Manghane 2013-10-07 09:06:32 -07:00
parent eb632ebaca
commit 1d4de00292

View File

@ -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
}