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

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

Issue 26284002: Rename "install" -> "get" and "update" -> "upgrade". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: sdk/lib/_internal/pub/lib/src/command/upgrade.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/update.dart b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
similarity index 58%
rename from sdk/lib/_internal/pub/lib/src/command/update.dart
rename to sdk/lib/_internal/pub/lib/src/command/upgrade.dart
index 5c3b4eda421acd498f0791d03e7767de9dd4ab53..65f710f91a0cb3e2f14fc2203201c9f9f18f47e0 100644
--- a/sdk/lib/_internal/pub/lib/src/command/update.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/upgrade.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library pub.command.update;
+library pub.command.upgrade;
import 'dart:async';
@@ -10,16 +10,16 @@ import '../command.dart';
import '../entrypoint.dart';
import '../log.dart' as log;
-/// Handles the `update` pub command.
-class UpdateCommand extends PubCommand {
+/// Handles the `upgrade` pub command.
+class UpgradeCommand extends PubCommand {
String get description =>
- "Update the current package's dependencies to the latest versions.";
-
- String get usage => 'pub update [dependencies...]';
+ "Upgrade the current package's dependencies to latest versions.";
nweiz 2013/10/07 21:25:15 Why was "the" removed here?
Bob Nystrom 2013/10/07 22:32:25 To keep the usage under 80 chars. "upgrade" was ju
+ String get usage => 'pub upgrade [dependencies...]';
+ final aliases = const ["update"];
bool get isOffline => commandOptions['offline'];
- UpdateCommand() {
+ UpgradeCommand() {
commandParser.addFlag('offline',
help: 'Use cached packages instead of accessing the network.');
}
@@ -27,15 +27,15 @@ class UpdateCommand extends PubCommand {
Future onRun() {
var future;
if (commandOptions.rest.isEmpty) {
- future = entrypoint.updateAllDependencies();
+ future = entrypoint.upgradeAllDependencies();
} else {
- future = entrypoint.updateDependencies(commandOptions.rest);
+ future = entrypoint.upgradeDependencies(commandOptions.rest);
}
return future.then((_) {
- log.message("Dependencies updated!");
+ log.message("Dependencies upgraded!");
if (isOffline) {
- log.warning("Warning: Updating when offline may not update you to the "
+ 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