computemapping

package
v0.0.0-...-3a98d3a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Overview

Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToDirBQRows

func ToDirBQRows(ctx context.Context, chromiumosCheckout string, manifest *repo.Manifest) ([]*dirmdpb.DirBQRow, error)

ToDirBQRows computes a DirBQRow for every DIR_METADATA in manifest. All default projects in the manifest must be synced. The DirBQRow is computed based off the checked out state of each project. Mappings are computed in parallel.

src/chromium projects are skipped because the imports between DIR_METADATAs (e.g. mixins) generally don't work with the layout ChromeOS manifests use.

Types

type MappingInfo

type MappingInfo struct {
	Mapping       *dirmd.Mapping
	AffectedFiles []string
}

MappingInfo groups a computed Mapping and affected files for a set of ChangeRevs in a project.

func ProjectInfos

func ProjectInfos(
	ctx context.Context,
	changeRevs []*gerrit.ChangeRev,
	workdirFn WorkdirCreation,
	cloneDepth time.Duration,
) ([]*MappingInfo, error)

computeProjectMappingInfos calculates a projectMappingInfo for each project and branch in changeRevs.

type WorkdirCreation

type WorkdirCreation func() (string, func() error, error)

WorkdirCreation is a function signature that returns a path to a workdir, a cleanup function, and an error if one occurred.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL