| 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;
|
| }
|
|
|