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

Unified Diff: utils/pub/path_source.dart

Issue 12335076: Handle shared path dependencies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/path_source.dart
diff --git a/utils/pub/path_source.dart b/utils/pub/path_source.dart
index 31ea9fb75157abafeb77474340ffc1a47600c11f..f9b2991306ffa6ddc6dd31989fce3b83d32e4226 100644
--- a/utils/pub/path_source.dart
+++ b/utils/pub/path_source.dart
@@ -9,6 +9,8 @@ import 'dart:io';
import '../../pkg/pathos/lib/path.dart' as path;
+import 'log.dart' as log;
+
import 'io.dart';
import 'package.dart';
import 'pubspec.dart';
@@ -30,6 +32,14 @@ class PathSource extends Source {
});
}
+ bool descriptionsEqual(description1, description2) {
+ // TODO(rnystrom): Traverse symlinks and compare real paths?
nweiz 2013/02/25 22:08:46 I'm leaning towards yes.
Bob Nystrom 2013/02/25 22:50:26 Done.
+ var path1 = path.normalize(description1["path"]);
+ var path2 = path.normalize(description2["path"]);
+ return path1 == path2 &&
+ description1["relative"] == description2["relative"];
nweiz 2013/02/25 22:08:46 I don't think this is correct. If both paths resol
Bob Nystrom 2013/02/25 22:50:26 Done.
+ }
+
Future<bool> install(PackageId id, String destination) {
return defer(() {
try {
@@ -44,7 +54,7 @@ class PathSource extends Source {
}
/// Parses a path dependency. This takes in a path string and returns a map.
- /// The "path" key will be the original path but resolves relative to the
+ /// The "path" key will be the original path but resolved relative to the
/// containing path. The "relative" key will be `true` if the original path
/// was relative.
///

Powered by Google App Engine
This is Rietveld 408576698