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

Unified Diff: utils/pub/command_uploader.dart

Issue 11785028: Commit Martin's patch for pub + lib_v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 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/command_lish.dart ('k') | utils/pub/command_version.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_uploader.dart
diff --git a/utils/pub/command_uploader.dart b/utils/pub/command_uploader.dart
index 618afc36f6d85c18435a742202e566bb332e5567..46b0ea0c6dd327864a5f7439856a446bdcb05e89 100644
--- a/utils/pub/command_uploader.dart
+++ b/utils/pub/command_uploader.dart
@@ -4,6 +4,7 @@
library command_uploader;
+import 'dart:async';
import 'dart:io';
import 'dart:uri';
@@ -56,12 +57,12 @@ class UploaderCommand extends PubCommand {
exit(exit_codes.USAGE);
}
- return new Future.immediate(null).chain((_) {
+ return new Future.immediate(null).then((_) {
var package = commandOptions['package'];
if (package != null) return new Future.immediate(package);
return Entrypoint.load(path.current, cache)
- .transform((entrypoint) => entrypoint.root.name);
- }).chain((package) {
+ .then((entrypoint) => entrypoint.root.name);
+ }).then((package) {
var uploader = commandOptions.rest[0];
return oauth2.withClient(cache, (client) {
if (command == 'add') {
@@ -74,7 +75,7 @@ class UploaderCommand extends PubCommand {
return client.delete(url);
}
});
- }).transform(handleJsonSuccess).transformException((e) {
+ }).then(handleJsonSuccess).catchError((e) {
if (e is! PubHttpException) throw e;
handleJsonError(e.response);
});
« no previous file with comments | « utils/pub/command_lish.dart ('k') | utils/pub/command_version.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698