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

Side by Side Diff: utils/pub/io.dart

Issue 12208006: Fix hosted tests on Windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove merge bug. Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | utils/tests/pub/pub.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Helper functionality to make working with IO easier. 5 /// Helper functionality to make working with IO easier.
6 library io; 6 library io;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:isolate'; 10 import 'dart:isolate';
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 // GZIP it. 7zip doesn't support doing both as a single operation. Send 871 // GZIP it. 7zip doesn't support doing both as a single operation. Send
872 // the output to stdout. 872 // the output to stdout.
873 args = ["a", "unused", "-tgzip", "-so", tarFile]; 873 args = ["a", "unused", "-tgzip", "-so", tarFile];
874 return startProcess(command, args); 874 return startProcess(command, args);
875 }).then((process) { 875 }).then((process) {
876 // Ignore 7zip's stderr. 7zip writes its normal output to stderr. We don't 876 // Ignore 7zip's stderr. 7zip writes its normal output to stderr. We don't
877 // want to show that since it's meaningless. 877 // want to show that since it's meaningless.
878 // 878 //
879 // TODO(rnystrom): Should log the stderr and display it if an actual error 879 // TODO(rnystrom): Should log the stderr and display it if an actual error
880 // occurs. 880 // occurs.
881 store(process.stdout, controller); 881 return store(process.stdout, controller);
882 }); 882 });
883 }).catchError((e) { 883 }).catchError((e) {
884 // We don't have to worry about double-signaling here, since the store() 884 // We don't have to worry about double-signaling here, since the store()
885 // above will only be reached if everything succeeds. 885 // above will only be reached if everything succeeds.
886 controller.signalError(e.error, e.stackTrace); 886 controller.signalError(e.error, e.stackTrace);
887 controller.close(); 887 controller.close();
888 }); 888 });
889 return new ByteStream(controller.stream); 889 return new ByteStream(controller.stream);
890 } 890 }
891 891
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 Directory _getDirectory(entry) { 932 Directory _getDirectory(entry) {
933 if (entry is Directory) return entry; 933 if (entry is Directory) return entry;
934 return new Directory(entry); 934 return new Directory(entry);
935 } 935 }
936 936
937 /// Gets a [Uri] for [uri], which can either already be one, or be a [String]. 937 /// Gets a [Uri] for [uri], which can either already be one, or be a [String].
938 Uri _getUri(uri) { 938 Uri _getUri(uri) {
939 if (uri is Uri) return uri; 939 if (uri is Uri) return uri;
940 return Uri.parse(uri); 940 return Uri.parse(uri);
941 } 941 }
OLDNEW
« no previous file with comments | « no previous file | utils/tests/pub/pub.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698