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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/upgrade.dart

Issue 103453005: Show detailed report on upgrade. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise again. Created 7 years 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
Index: sdk/lib/_internal/pub/lib/src/command/upgrade.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
index 306e027cfdf9b30fac4d4177048871aa2b07817a..a14ab6fe5de669b6ef845ce11ee31ca7fe7e1b34 100644
--- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
@@ -26,15 +26,19 @@ class UpgradeCommand extends PubCommand {
}
Future onRun() {
- var future;
- if (commandOptions.rest.isEmpty) {
- future = entrypoint.upgradeAllDependencies();
- } else {
- future = entrypoint.upgradeDependencies(commandOptions.rest);
- }
-
- return future.then((_) {
- log.message("Dependencies upgraded!");
+ var upgradeAll = commandOptions.rest.isEmpty;
+ return entrypoint.acquireDependencies(useLatest: commandOptions.rest,
+ upgradeAll: upgradeAll).then((numChanged) {
+ // TODO(rnystrom): Show a more detailed message about what was added,
+ // removed, modified, and/or upgraded?
+ if (numChanged == 0) {
+ log.message("No dependencies changed.");
+ } else if (numChanged == 1) {
+ log.message("Changed $numChanged dependency!");
+ } else {
+ log.message("Changed $numChanged dependencies!");
+ }
+
if (isOffline) {
log.warning("Warning: Upgrading when offline may not update you to the "
"latest versions of your dependencies.");

Powered by Google App Engine
This is Rietveld 408576698