RepositoryManager
Manages a collection of bare repositories.
RepositoryManager.swift:19class RepositoryManager
Citizens in SourceControl
Conformances
Types
struct FetchDetails
Additional information about a fetch
struct RepositoryHandle
Handle to a managed repository.
Typealiases
Type members
init(fileSystem: FileSystem, path: AbsolutePath, provider: RepositoryProvider, cachePath: AbsolutePath?, cacheLocalPackages: Bool, maxConcurrentOperations: Int?, initializationWarningHandler: (String) -> Void, delegate: Delegate?
) Create a new empty manager.
Instance members
let path: AbsolutePath
The path under which repositories are stored.
func cancel(deadline: DispatchTime
) throws func isValidDirectory(AbsolutePath
) throws -> Bool Returns true if the directory is valid git location.
func isValidDirectory(AbsolutePath, for: RepositorySpecifier
) throws -> Bool Returns true if the directory is valid git location for the specified repository
func isValidWorkingCopy(WorkingCheckout, for: RepositorySpecifier
) throws -> Bool Validate a working copy check is aligned with its repository setup
func lookup(package: PackageIdentity, repository: RepositorySpecifier, updateStrategy: RepositoryUpdateStrategy, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue
) async throws -> RepositoryHandle func lookup(package: PackageIdentity, repository: RepositorySpecifier, updateStrategy: RepositoryUpdateStrategy, observabilityScope: ObservabilityScope, delegateQueue: DispatchQueue, callbackQueue: DispatchQueue, completion: @escaping (Result<RepositoryHandle, Error>) -> Void
) Get a handle to a repository.
func openWorkingCopy(at: AbsolutePath
) throws -> WorkingCheckout Open a working copy checkout at a path
func purgeCache(observabilityScope: ObservabilityScope
) Purges the cached repositories from the cache.
func remove(repository: RepositorySpecifier
) throws Removes the repository.
func reset(observabilityScope: ObservabilityScope
) Reset the repository manager.
Available in Workspace
Conformances
protocol Copyable
A type whose values can be implicitly or explicitly copied.
protocol Escapable
protocol ManifestSourceControlValidator