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

Unified Diff: test/descriptor/git.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 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 | « test/descriptor.dart ('k') | test/descriptor/packages.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/descriptor/git.dart
diff --git a/test/descriptor/git.dart b/test/descriptor/git.dart
index 9e9656b74f9737be5bd4774ce63d327d06793a16..0a1687c4b318daf381932996d97ae45e49d69014 100644
--- a/test/descriptor/git.dart
+++ b/test/descriptor/git.dart
@@ -42,9 +42,12 @@ class GitRepoDescriptor extends DirectoryDescriptor {
/// referred to by [ref] at the current point in the scheduled test run.
///
/// [parent] defaults to [defaultRoot].
- Future<String> revParse(String ref, [String parent]) => schedule(() {
- return _runGit(['rev-parse', ref], parent).then((output) => output[0]);
- }, 'parsing revision $ref for Git repo:\n${describe()}');
+ Future<String> revParse(String ref, [String parent]) {
+ return schedule/*<Future<String>>*/(() async {
+ var output = await _runGit(['rev-parse', ref], parent);
+ return output[0];
+ }, 'parsing revision $ref for Git repo:\n${describe()}');
+ }
/// Schedule a Git command to run in this repository.
///
@@ -53,8 +56,11 @@ class GitRepoDescriptor extends DirectoryDescriptor {
return _runGit(args, parent);
}, "running 'git ${args.join(' ')}' in Git repo:\n${describe()}");
- Future _runGitCommands(String parent, List<List<String>> commands) =>
- Future.forEach(commands, (command) => _runGit(command, parent));
+ Future _runGitCommands(String parent, List<List<String>> commands) async {
+ for (var command in commands) {
+ await _runGit(command, parent);
+ }
+ }
Future<List<String>> _runGit(List<String> args, String parent) {
// Explicitly specify the committer information. Git needs this to commit
« no previous file with comments | « test/descriptor.dart ('k') | test/descriptor/packages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698