def run_shipit()

in build/fbcode_builder/getdeps/fetcher.py [0:0]


    def run_shipit(self) -> None:
        tmp_path = self.repo_dir + ".new"
        try:
            if os.path.exists(tmp_path):
                shutil.rmtree(tmp_path)

            # Run shipit
            run_cmd(
                [
                    "php",
                    ShipitTransformerFetcher.SHIPIT,
                    "--project=" + self.project_name,
                    "--create-new-repo",
                    "--source-repo-dir=" + self.build_options.fbsource_dir,
                    "--source-branch=.",
                    "--skip-source-init",
                    "--skip-source-pull",
                    "--skip-source-clean",
                    "--skip-push",
                    "--skip-reset",
                    "--destination-use-anonymous-https",
                    "--create-new-repo-output-path=" + tmp_path,
                ]
            )

            # Remove the .git directory from the repository it generated.
            # There is no need to commit this.
            repo_git_dir = os.path.join(tmp_path, ".git")
            shutil.rmtree(repo_git_dir)
            os.rename(tmp_path, self.repo_dir)
        except Exception:
            # Clean up after a failed extraction
            if os.path.exists(tmp_path):
                shutil.rmtree(tmp_path)
            self.clean()
            raise