| # SPDX-FileCopyrightText: StorPool <support@storpool.com> |
| # SPDX-License-Identifier: BSD-2-Clause |
| """Common definitions for the gifn-apply routines.""" |
| from __future__ import annotations |
| from typing import TYPE_CHECKING |
| import urllib.parse as uparse |
| class GApplyError(Exception): |
| """The base class for errors that occurred during the gifn-apply operation.""" |
| @dataclasses.dataclass(frozen=True, order=True) |
| """A repository split into the origin fragment and the name/path within.""" |
| """Combine the origin and the repo path.""" |
| return f"{self.origin}/{self.repo}" |
| @dataclasses.dataclass(frozen=True) |
| """A parsed URL for a repo base.""" |
| @dataclasses.dataclass(frozen=True) |
| """Runtime configuration for the gifn-apply tool.""" |
| repo_urls: dict[str, RepoURL] |