29
29
30
30
# ######### Global variable definitions
31
31
32
+ BASE_URL=" https://code.google.com/p/v8/source/list"
32
33
VERSION=" src/version.cc"
33
34
MAJOR=" MAJOR_VERSION"
34
35
MINOR=" MINOR_VERSION"
@@ -49,10 +50,25 @@ Fetches V8 revision information from a git-svn checkout.
49
50
50
51
OPTIONS:
51
52
-h Show this message.
53
+
52
54
-i Print revision info for all branches matching the V8 version.
55
+ Example usage: $0 -i 3.19.10$
56
+ Output format: [Git hash] [SVN revision] [V8 version]
57
+
53
58
-v Print the V8 version tag for a trunk SVN revision.
59
+ Example usage: $0 -v 14981
60
+ Output format: [V8 version]
61
+
54
62
-m Print all patches that were merged to the specified V8 branch.
63
+ Example usage: $0 -m 3.18
64
+ Output format: [V8 version] [SVN revision] [SVN patch merged]*.
65
+
55
66
-p Print all patches merged to a specific V8 point-release.
67
+ Example usage: $0 -p 3.19.12.1
68
+ Output format: [SVN patch merged]*
69
+
70
+ -u Print a link to all SVN revisions between two V8 revision tags.
71
+ Example usage: $0 -u 3.19.10:3.19.11
56
72
EOF
57
73
}
58
74
@@ -113,9 +129,16 @@ merges_to_branch() {
113
129
done
114
130
}
115
131
132
+ url_for () {
133
+ first=$( svn_rev trunk $( v8_hash $( echo $1 | cut -d" :" -f1) ) )
134
+ last=$( svn_rev trunk $( v8_hash $( echo $1 | cut -d" :" -f2) ) )
135
+ num=$[ $last - $first ]
136
+ echo " $BASE_URL ?num=$num &start=$last "
137
+ }
138
+
116
139
# ######### Option parsing
117
140
118
- while getopts " :hi:v:m:p:" OPTION ; do
141
+ while getopts " :hi:v:m:p:u: " OPTION ; do
119
142
case $OPTION in
120
143
h) usage
121
144
exit 0
@@ -126,7 +149,9 @@ while getopts ":hi:v:m:p:" OPTION ; do
126
149
;;
127
150
m) merges_to_branch $OPTARG
128
151
;;
129
- p) point_merges " $( tag_log $( v8_hash $OPTARG ) ^1) "
152
+ p) echo $( point_merges " $( tag_log $( v8_hash $OPTARG ) ^1) " )
153
+ ;;
154
+ u) url_for $OPTARG
130
155
;;
131
156
? ) echo " Illegal option: -$OPTARG "
132
157
usage
0 commit comments