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
Родитель bd95eb9e7d
Коммит 5f4148cf9b
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

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