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

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: 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..08fa1e88a1f4f5723c4c41a144ceec9601bbf688 100644
--- a/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
@@ -26,15 +26,17 @@ 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.getDependencies(useLatest: commandOptions.rest,
+ upgradeAll: upgradeAll).then((numChanged) {
+ if (numChanged == 0) {
+ log.message("No dependencies changed.");
+ } else if (numChanged == 1) {
+ log.message("Changed $numChanged dependency!");
+ } else {
+ log.message("Changed $numChanged dependencies!");
nweiz 2013/12/11 06:48:32 I don't know how clear the notion of "changing a d
Bob Nystrom 2013/12/11 22:36:59 Yup, also the common cases of adding a new depende
+ }
+
if (isOffline) {
log.warning("Warning: Upgrading when offline may not update you to the "
"latest versions of your dependencies.");
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/entrypoint.dart » ('j') | sdk/lib/_internal/pub/lib/src/entrypoint.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698