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

Unified Diff: utils/pub/git_source.dart

Issue 12171002: Tweak SDK constraint checking a bit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: utils/pub/git_source.dart
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 2b46706c8a8b168187fa463610ade1b2dddad1dd..693f0669243904712e90b1322bc1b08304279a03 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -44,7 +44,7 @@ class GitSource extends Source {
return ensureDir(join(systemCacheRoot, 'cache'));
}).then((_) => _ensureRepoCache(id))
- .then((_) => _revisionCachePath(id))
+ .then((_) => systemCacheDirectory(id))
.then((path) {
revisionCachePath = path;
return exists(revisionCachePath);
@@ -60,8 +60,13 @@ class GitSource extends Source {
});
}
- Future<String> systemCacheDirectory(PackageId id) => _revisionCachePath(id);
-
+ /// Returns the path to the revision-specific cache of [id].
+ Future<String> systemCacheDirectory(PackageId id) {
+ return _revisionAt(id).then((rev) {
+ var revisionCacheName = '${id.name}-$rev';
+ return join(systemCacheRoot, revisionCacheName);
+ });
+ }
nweiz 2013/02/02 00:15:29 Style nit: extra line needed below here
/// Ensures [description] is a Git URL.
void validateDescription(description, {bool fromLockFile: false}) {
// A single string is assumed to be a Git URL.
@@ -120,14 +125,6 @@ class GitSource extends Source {
workingDir: _repoCachePath(id)).then((result) => result[0]);
}
- /// Returns the path to the revision-specific cache of [id].
- Future<String> _revisionCachePath(PackageId id) {
- return _revisionAt(id).then((rev) {
- var revisionCacheName = '${id.name}-$rev';
- return join(systemCacheRoot, revisionCacheName);
- });
- }
-
/// Clones the repo at the URI [from] to the path [to] on the local
/// filesystem.
///

Powered by Google App Engine
This is Rietveld 408576698