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

Unified Diff: lib/src/command/cache_add.dart

Issue 2044253003: Refactor Source and SourceRegistry. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Rename LiveSource to BoundSource. Created 4 years, 6 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 | « lib/src/command.dart ('k') | lib/src/command/cache_list.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command/cache_add.dart
diff --git a/lib/src/command/cache_add.dart b/lib/src/command/cache_add.dart
index 77cfd81d106592e6fa2219a870e4bf6d74258d0b..9ae3d62ff924079d6b8c52c81c721f3457fba728 100644
--- a/lib/src/command/cache_add.dart
+++ b/lib/src/command/cache_add.dart
@@ -8,7 +8,6 @@ import 'package:pub_semver/pub_semver.dart';
import '../command.dart';
import '../log.dart' as log;
-import '../source/hosted.dart';
import '../utils.dart';
/// Handles the `cache add` pub command.
@@ -54,10 +53,10 @@ class CacheAddCommand extends PubCommand {
}
// TODO(rnystrom): Support installing from git too.
- var source = cache.sources["hosted"];
+ var source = cache.source("hosted");
// TODO(rnystrom): Allow specifying the server.
- var ids = (await source.getVersions(HostedSource.refFor(package)))
+ var ids = (await source.getVersions(cache.sources.hosted.refFor(package)))
.where((id) => constraint.allows(id.version))
.toList();
« no previous file with comments | « lib/src/command.dart ('k') | lib/src/command/cache_list.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698