Commit fc71d7b8 authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

misc/chrome/gophertool: update for the git/gerrit transition

Change-Id: I7b9601ae6e1cfb18ef79a7b189aa7e689c0fe942
Reviewed-on: https://go-review.googlesource.com/1621Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 0fa6e7fe
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
var numericRE = /^\d+$/; var numericRE = /^\d+$/;
var commitRE = /^(?:\d+:)?([0-9a-f]{6,20})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47" var commitRE = /^(?:\d+:)?([0-9a-f]{6,40})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47"
var gerritChangeIdRE = /^I[0-9a-f]{4,40}$/; // e.g. Id69c00d908d18151486007ec03da5495b34b05f5
var pkgRE = /^[a-z0-9_\/]+$/; var pkgRE = /^[a-z0-9_\/]+$/;
function urlForInput(t) { function urlForInput(t) {
...@@ -21,6 +22,10 @@ function urlForInput(t) { ...@@ -21,6 +22,10 @@ function urlForInput(t) {
return "https://golang.org/cl/" + t; return "https://golang.org/cl/" + t;
} }
if (gerritChangeIdRE.test(t)) {
return "http://golang.org/cl/" + t;
}
var match = commitRE.exec(t); var match = commitRE.exec(t);
if (match) { if (match) {
return "https://golang.org/change/" + match[1]; return "https://golang.org/change/" + match[1];
......
...@@ -9,11 +9,13 @@ ...@@ -9,11 +9,13 @@
<script src="popup.js"></script> <script src="popup.js"></script>
</head> </head>
<body style='margin: 0.5em; font-family: sans;'> <body style='margin: 0.5em; font-family: sans;'>
<small><a href="#" url="http://code.google.com/p/go/issues/list">issue</a>, <small><a href="#" url="https://golang.org/issue">issue</a>,
<a href="#" url="http://codereview.appspot.com/">codereview</a>, <a href="#" url="https://golang.org/cl">codereview</a>,
<a href="#" url="http://code.google.com/p/go/source/list">commit</a>, or <a href="#" url="https://golang.org/change">commit</a>, or
<a href="#" url="http://golang.org/pkg/">pkg</a> id/name:</small> <a href="#" url="https://golang.org/pkg/">pkg</a> id/name:</small>
<form style='margin: 0' id='navform'><nobr><input id="inputbox" size=10 tabindex=1 /><input type="submit" value="go" /></nobr></form> <form style='margin: 0' id='navform'><nobr><input id="inputbox" size=10 tabindex=1 /><input type="submit" value="go" /></nobr></form>
<small>Also: <a href="#" url="http://build.golang.org">buildbots</a></small> <small>Also: <a href="#" url="https://build.golang.org">buildbots</a>
<a href="#" url="https://github.com/golang/go">Github</a>
</small>
</body> </body>
</html> </html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment