Commit f5a011dd authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

gophertool: also accept commit form 8486:ab29d2698a47

... as "hg log" produces by default.

And add a README.

R=rsc, bradfitz
CC=golang-dev
https://golang.org/cl/4529080
parent 32d12782
To install:
1) chrome://extensions/
2) click "[+] Developer Mode" in top right
3) "Load unpacked extension..."
4) pick $GOROOT/misc/chrome/gophertool
Done. It'll now auto-reload from source.
...@@ -13,7 +13,7 @@ function focusinput() { ...@@ -13,7 +13,7 @@ function focusinput() {
} }
var numericRE = /^\d+$/; var numericRE = /^\d+$/;
var commitRE = /^[0-9a-f]{6,20}$/; var commitRE = /^(?:\d+:)?([0-9a-f]{6,20})$/; // e.g "8486:ab29d2698a47" or "ab29d2698a47"
var pkgRE = /^[a-z0-9_\/]+$/; var pkgRE = /^[a-z0-9_\/]+$/;
function navigate() { function navigate() {
...@@ -38,8 +38,9 @@ function navigate() { ...@@ -38,8 +38,9 @@ function navigate() {
return success("http://codereview.appspot.com/" + t + "/"); return success("http://codereview.appspot.com/" + t + "/");
} }
if (commitRE.test(t)) { var match = commitRE.exec(t);
return success("http://code.google.com/p/go/source/detail?r=" + t); if (match) {
return success("http://code.google.com/p/go/source/detail?r=" + match[1])
} }
if (pkgRE.test(t)) { if (pkgRE.test(t)) {
......
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