From 05fa16d2852c3a28b0354f88d50449e827bc18ac Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Sat, 13 Dec 2014 14:49:54 +1100 Subject: [PATCH] dashboard/app: add review subrepo, link changes correctly Change-Id: I1eeea2beb4ffab690b2bb005c08a08d7e41c1fc3 Reviewed-on: https://go-review.googlesource.com/1503 Reviewed-by: Minux Ma Reviewed-by: Andrew Gerrand --- dashboard/app/build/dash.go | 5 +++++ dashboard/app/build/ui.go | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dashboard/app/build/dash.go b/dashboard/app/build/dash.go index 37a044fb..04413265 100644 --- a/dashboard/app/build/dash.go +++ b/dashboard/app/build/dash.go @@ -160,6 +160,11 @@ var goPackages = []*Package{ Name: "net", Path: "golang.org/x/net", }, + { + Kind: "subrepo", + Name: "review", + Path: "golang.org/x/review", + }, { Kind: "subrepo", Name: "sys", diff --git a/dashboard/app/build/ui.go b/dashboard/app/build/ui.go index 9891e3f8..1fe6fd9f 100644 --- a/dashboard/app/build/ui.go +++ b/dashboard/app/build/ui.go @@ -435,7 +435,11 @@ func repoURL(dashboard, hash, packagePath string) (string, error) { if dashboard == "Gccgo" { return "https://code.google.com/p/gofrontend/source/detail?r=" + hash, nil } - return "https://golang.org/change/" + hash, nil + if dashboard == "Mercurial" { + return "https://golang.org/change/" + hash, nil + } + // TODO(adg): use the above once /change/ points to git hashes + return "https://go.googlesource.com/go/+/" + hash, nil } // TODO(adg): remove this old hg stuff, one day.