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

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

Issue 12090093: Reapply "Rename mappedBy to map." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed bug in previous commit. 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 | « tools/dom/templates/immutable_list_mixin.darttemplate ('k') | utils/pub/entrypoint.dart » ('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 library command_lish; 5 library command_lish;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:json'; 9 import 'dart:json';
10 import 'dart:uri'; 10 import 'dart:uri';
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 git.isInstalled 121 git.isInstalled
122 ]).then((results) { 122 ]).then((results) {
123 if (results[0] && results[1]) { 123 if (results[0] && results[1]) {
124 // List all files that aren't gitignored, including those not checked 124 // List all files that aren't gitignored, including those not checked
125 // in to Git. 125 // in to Git.
126 return git.run(["ls-files", "--cached", "--others", 126 return git.run(["ls-files", "--cached", "--others",
127 "--exclude-standard"]); 127 "--exclude-standard"]);
128 } 128 }
129 129
130 return listDir(rootDir, recursive: true).then((entries) { 130 return listDir(rootDir, recursive: true).then((entries) {
131 return Future.wait(entries.mappedBy((entry) { 131 return Future.wait(entries.map((entry) {
132 return fileExists(entry).then((isFile) { 132 return fileExists(entry).then((isFile) {
133 // Skip directories. 133 // Skip directories.
134 if (!isFile) return null; 134 if (!isFile) return null;
135 135
136 // TODO(rnystrom): Making these relative will break archive 136 // TODO(rnystrom): Making these relative will break archive
137 // creation if the cwd is ever *not* the package root directory. 137 // creation if the cwd is ever *not* the package root directory.
138 // Should instead only make these relative right before generating 138 // Should instead only make these relative right before generating
139 // the tree display (which is what really needs them to be). 139 // the tree display (which is what really needs them to be).
140 // Make it relative to the package root. 140 // Make it relative to the package root.
141 return relativeTo(entry, rootDir); 141 return relativeTo(entry, rootDir);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 var s = warnings.length == 1 ? '' : 's'; 177 var s = warnings.length == 1 ? '' : 's';
178 message = "Package has ${warnings.length} warning$s. Upload anyway"; 178 message = "Package has ${warnings.length} warning$s. Upload anyway";
179 } 179 }
180 180
181 return confirm(message).then((confirmed) { 181 return confirm(message).then((confirmed) {
182 if (!confirmed) throw "Package upload canceled."; 182 if (!confirmed) throw "Package upload canceled.";
183 }); 183 });
184 }); 184 });
185 } 185 }
186 } 186 }
OLDNEW
« no previous file with comments | « tools/dom/templates/immutable_list_mixin.darttemplate ('k') | utils/pub/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698