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

Unified Diff: tools/release/version.dart

Issue 12751005: Reapply "Update the test runner to use the new dart:io API" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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 | « tests/standalone/standalone.status ('k') | tools/test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/release/version.dart
diff --git a/tools/release/version.dart b/tools/release/version.dart
index 73ef164023ca582eb62193f8ce38e0c4fefb32cd..74e1e66363d0dde9d2c933a661e1926ce3ab97be 100644
--- a/tools/release/version.dart
+++ b/tools/release/version.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -62,9 +62,10 @@ class Version {
completeError("No VERSION file");
return;
}
- StringInputStream input = new StringInputStream(f.openInputStream());
- input.onLine = () {
- var line = input.readLine().trim();
+ Stream<String> stream =
+ f.openRead().transform(new StringDecoder())
+ .transform(new LineTransformer());
+ stream.listen((String line) {
if (line == null) {
completeError(
"VERSION input file seems to be in the wrong format");
@@ -101,8 +102,8 @@ class Version {
"contain one of {MAJOR, MINOR, BUILD, PATCH}");
return;
}
- };
- input.onClosed = () {
+ },
+ onDone: () {
// Only complete if we did not already complete with a failure.
if (!wasCompletedWithError) {
getRevision().then((revision) {
@@ -117,7 +118,7 @@ class Version {
return;
});
}
- };
+ });
});
return c.future;
}
« no previous file with comments | « tests/standalone/standalone.status ('k') | tools/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698