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

Unified Diff: utils/pub/git_source.dart

Issue 13196007: Replace defer() with Future.of in pub. (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 | « utils/pub/error_group.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/git_source.dart
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 119389266a8861e31e1154abcefedc04963ca52c..cea2bacf59ff2de0f89842ad1af128cce9ee502d 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -123,7 +123,7 @@ class GitSource extends Source {
/// future that completes once this is finished and throws an exception if it
/// fails.
Future _ensureRepoCache(PackageId id) {
- return defer(() {
+ return new Future.of(() {
var path = _repoCachePath(id);
if (!entryExists(path)) return _clone(_getUrl(id), path, mirror: true);
return git.run(["fetch"], workingDir: path).then((result) => null);
@@ -143,7 +143,7 @@ class GitSource extends Source {
/// the working tree, but instead makes the repository a local mirror of the
/// remote repository. See the manpage for `git clone` for more information.
Future _clone(String from, String to, {bool mirror: false}) {
- return defer(() {
+ return new Future.of(() {
// Git on Windows does not seem to automatically create the destination
// directory.
ensureDir(to);
« no previous file with comments | « utils/pub/error_group.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698