Index: recipe_engine/package.py |
diff --git a/recipe_engine/package.py b/recipe_engine/package.py |
index dd235ffedfbd55b677be3bffb0de9019a75633ab..e4e54a13299ed000dc5033f50ec6f37d87c4fab8 100644 |
--- a/recipe_engine/package.py |
+++ b/recipe_engine/package.py |
@@ -166,7 +166,7 @@ class RepoSpec(object): |
return not (self == other) |
def proto_file(self, context): |
- """Returns the ProtoFile of the recipes config file in this repository. |
+ """Returns the ProtoFile of the recipes config file in this repository. |
Requires a good checkout.""" |
return ProtoFile(InfraRepoConfig().to_recipes_cfg(self.repo_root(context))) |
@@ -316,7 +316,7 @@ class PathRepoSpec(RepoSpec): |
return self.path |
def proto_file(self, context): |
- """Returns the ProtoFile of the recipes config file in this repository. |
+ """Returns the ProtoFile of the recipes config file in this repository. |
Requires a good checkout.""" |
return ProtoFile(InfraRepoConfig().to_recipes_cfg(self.path)) |
@@ -509,6 +509,9 @@ class PackageSpec(object): |
@classmethod |
def spec_for_dep(cls, dep): |
"""Returns a RepoSpec for the given dependency protobuf.""" |
+ url = str(dep.url) |
+ if url.startswith("file://"): |
+ return PathRepoSpec(url[7:]) |
martiniss
2017/02/02 23:44:56
nit: change this to
return PathRepoSpec(url[len(
iannucci
2017/02/02 23:58:08
Done.
|
if dep.repo_type in (package_pb2.DepSpec.GIT, package_pb2.DepSpec.GITILES): |
if dep.repo_type == package_pb2.DepSpec.GIT: |
@@ -516,7 +519,7 @@ class PackageSpec(object): |
elif dep.repo_type == package_pb2.DepSpec.GITILES: |
backend = fetch.GitilesBackend() |
return GitRepoSpec(str(dep.project_id), |
- str(dep.url), |
+ url, |
str(dep.branch), |
str(dep.revision), |
str(dep.path_override), |