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

Unified Diff: tools/release/version.dart

Issue 11118014: Update version.dart to fetch the last changed revision of the root directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/release/version.dart
===================================================================
--- tools/release/version.dart (revision 13592)
+++ tools/release/version.dart (working copy)
@@ -122,7 +122,7 @@
int getRevisionFromSvnInfo(String info) {
if (info == null || info == '') return 0;
var lines = info.split("\n");
- RegExp exp = const RegExp(r"Revision: (\d*)");
+ RegExp exp = const RegExp(r"Last Changed Rev: (\d*)");
for (var line in lines) {
if (exp.hasMatch(line)) {
String revisionString = (exp.firstMatch(line).group(1));
@@ -144,7 +144,15 @@
var command = isSvn ? "svn" : "git";
command = "$command${getExecutableSuffix()}";
var arguments = isSvn ? ["info"] : ["svn", "info"];
- return Process.run(command, arguments).transform((result) {
+ ProcessOptions options = new ProcessOptions();
+ // Run the command from the root to get the last changed revision for this
+ // "branch". Since we have both trunk and bleeding edge in the same
+ // repository and since we always build TOT we need this to get the
+ // right version number.
+ Path root =
+ new Path.fromNative(_versionFileName).directoryPath.directoryPath;
+ options.workingDirectory = root.toNativePath();
+ return Process.run(command, arguments, options).transform((result) {
if (result.exitCode != 0) {
return 0;
}
« 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