Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2735)

Unified Diff: tools/v8-info.sh

Issue 16802003: Add sample usage / output and -u option (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/v8-info.sh
diff --git a/tools/v8-info.sh b/tools/v8-info.sh
index bb29728b64f5b0d5bfdfe80f2ad347fa4181caee..1f25d147a571ebe8d4c435f6507441c15437cd3c 100755
--- a/tools/v8-info.sh
+++ b/tools/v8-info.sh
@@ -29,6 +29,7 @@
########## Global variable definitions
+BASE_URL="https://code.google.com/p/v8/source/list"
VERSION="src/version.cc"
MAJOR="MAJOR_VERSION"
MINOR="MINOR_VERSION"
@@ -49,10 +50,25 @@ Fetches V8 revision information from a git-svn checkout.
OPTIONS:
-h Show this message.
+
-i Print revision info for all branches matching the V8 version.
+ Example usage: $0 -i 3.19.10$
+ Output format: [Git hash] [SVN revision] [V8 version]
+
-v Print the V8 version tag for a trunk SVN revision.
+ Example usage: $0 -v 14981
+ Output format: [V8 version]
+
-m Print all patches that were merged to the specified V8 branch.
+ Example usage: $0 -m 3.18
+ Output format: [V8 version] [SVN revision] [SVN patch merged]*.
+
-p Print all patches merged to a specific V8 point-release.
+ Example usage: $0 -p 3.19.12.1
+ Output format: [SVN patch merged]*
+
+ -u Print a link to all SVN revisions between two V8 revision tags.
+ Example usage: $0 -u 3.19.10:3.19.11
EOF
}
@@ -113,9 +129,16 @@ merges_to_branch() {
done
}
+url_for() {
+ first=$(svn_rev trunk $(v8_hash $(echo $1 | cut -d":" -f1)))
+ last=$(svn_rev trunk $(v8_hash $(echo $1 | cut -d":" -f2)))
+ num=$[ $last - $first]
+ echo "$BASE_URL?num=$num&start=$last"
+}
+
########## Option parsing
-while getopts ":hi:v:m:p:" OPTION ; do
+while getopts ":hi:v:m:p:u:" OPTION ; do
case $OPTION in
h) usage
exit 0
@@ -126,7 +149,9 @@ while getopts ":hi:v:m:p:" OPTION ; do
;;
m) merges_to_branch $OPTARG
;;
- p) point_merges "$(tag_log $(v8_hash $OPTARG)^1)"
+ p) echo $(point_merges "$(tag_log $(v8_hash $OPTARG)^1)")
+ ;;
+ u) url_for $OPTARG
;;
?) echo "Illegal option: -$OPTARG"
usage
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698