| Index: sdk/lib/_internal/pub/lib/src/lock_file.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/lock_file.dart b/sdk/lib/_internal/pub/lib/src/lock_file.dart
|
| index a4cba8f776f7e254a34741bb398ec02ad0219893..95421a604fc372af3f170a0fc6c2f9142b51db7f 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/lock_file.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/lock_file.dart
|
| @@ -17,6 +17,16 @@ class LockFile {
|
| /// The packages this lockfile pins.
|
| Map<String, PackageId> packages;
|
|
|
| + /// Creates a new lockfile containing [ids].
|
| + factory LockFile(List<PackageId> ids) {
|
| + var lockFile = new LockFile.empty();
|
| + for (var id in ids) {
|
| + if (!id.isRoot) lockFile.packages[id.name] = id;
|
| + }
|
| +
|
| + return lockFile;
|
| + }
|
| +
|
| LockFile._(this.packages);
|
|
|
| LockFile.empty()
|
|
|