1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-07 07:02:53 +03:00

fbcode_builder: getdeps: add ShipitTransformer fetcher

Summary:
This fetcher knows how to take a 1st party FB project
from fbsource and transform it to the same shape as our github
repos using ShipIt.  The transformation creates a transformed
mirror of the code in scratch space (rather than mutating fbsource
directly).

This can only be used in environments where shipit is available.
A later diff implements an alternative that works in more environments.

Reviewed By: simpkins

Differential Revision: D14691013

fbshipit-source-id: 539e307755c9fc0a098a235868ab622652061494
This commit is contained in:
Wez Furlong
2019-05-03 15:52:39 -07:00
committed by Facebook Github Bot
parent 2d3cfa077f
commit 842f30d3a1
2 changed files with 83 additions and 1 deletions

View File

@@ -11,7 +11,7 @@ from __future__ import absolute_import, division, print_function, unicode_litera
import io
from .expr import parse_expr
from .fetcher import ArchiveFetcher, GitFetcher
from .fetcher import ArchiveFetcher, GitFetcher, ShipitTransformerFetcher
try:
@@ -258,6 +258,15 @@ class ManifestParser(object):
return d
def create_fetcher(self, build_options, ctx):
if (
self.fbsource_path
and build_options.fbsource_dir
and self.shipit_project
and ShipitTransformerFetcher.available()
):
# We can use the code from fbsource
return ShipitTransformerFetcher(build_options, self.shipit_project)
repo_url = self.get("git", "repo_url", ctx=ctx)
if repo_url:
rev = self.get("git", "rev")