Parse branches.conf into a map of branch -> properties (BranchProps).
More...
#include <Branches.h>
|
| enum | Filter : unsigned { BUILD = 1U << 0
, PUBLISH = 1U << 1
, EXCLUDED = 1U << 2
, ANY = ~0U
} |
| | Constants used for filter().
|
|
using | BranchesSet = std::unordered_set<std::string> |
| | A set of branches.
|
|
using | BranchesList = BranchProps::BranchesList |
| | A list of branches.
|
| using | BranchesMap |
| | Branch -> BranchProps mapping.
|
|
| const BranchesMap & | map () const noexcept |
| | Obtain whole branch map.
|
| auto | begin () const noexcept |
| | Obtain begin iterator of branches.
|
| auto | end () const noexcept |
| | Obtain end iterator of branches.
|
| BranchesList | filter (unsigned include=ANY, unsigned exclude=EXCLUDED) const |
| | Obtain BranchesList according to a filter specified by include and exclude.
|
|
const BranchProps & | props (std::string_view branch) const |
| | Return BranchProps for branch.
|
| const BranchesList & | merges (std::string_view branch) const |
| | Immediate branches that the specified branch merges.
|
| BranchesSet | mergesClosure (std::string_view branch) const |
| | Closure of branches that the specified branch merges.
|
|
| static Branches | create (std::string_view branchesConf) noexcept |
| | Parse provided branchesConf into Branches.
|
| static std::optional< Branches > | create () |
| | Download branches.conf and parse it into Branches.
|
| static BranchesList | getBuildBranches (std::string_view branchesConf) noexcept |
| | Convert branchesConf to a list of branches which are built.
|
| static std::optional< BranchesList > | getBuildBranches () |
| | Download branches.conf and convert it to a list of branches which are built.
|
Parse branches.conf into a map of branch -> properties (BranchProps).
◆ BranchesMap
Initial value:
Equality test for string and string_view to be used in containers.
Definition String.h:250
Hash for string and string_view to be used in hashing containers.
Definition String.h:223
Properties of a branch stored in Branches.
Definition Branches.h:20
Branch -> BranchProps mapping.
◆ begin()
| auto SlKernCVS::Branches::begin |
( |
| ) |
const |
|
inlinenoexcept |
Obtain begin iterator of branches.
- Returns
- Begin iterator.
◆ create() [1/2]
| std::optional< Branches > SlKernCVS::Branches::create |
( |
| ) |
|
|
static |
Download branches.conf and parse it into Branches.
- Returns
- Branches if successful or nullopt.
◆ create() [2/2]
| Branches SlKernCVS::Branches::create |
( |
std::string_view | branchesConf | ) |
|
|
staticnoexcept |
Parse provided branchesConf into Branches.
- Parameters
-
| branchesConf | branches.conf content to parse |
- Returns
- Branches parsed from
branchesConf
◆ end()
| auto SlKernCVS::Branches::end |
( |
| ) |
const |
|
inlinenoexcept |
Obtain end iterator of branches.
- Returns
- End iterator.
◆ filter()
| BranchesList SlKernCVS::Branches::filter |
( |
unsigned | include = ANY, |
|
|
unsigned | exclude = EXCLUDED ) const |
Obtain BranchesList according to a filter specified by include and exclude.
- Parameters
-
| include | Properties of branches to include in the output |
| exclude | Properties of branches to exclude from the output |
- Returns
- BranchesList according to the specified filter
◆ getBuildBranches() [1/2]
| std::optional< BranchesList > SlKernCVS::Branches::getBuildBranches |
( |
| ) |
|
|
static |
Download branches.conf and convert it to a list of branches which are built.
- Returns
- List of built branches.
◆ getBuildBranches() [2/2]
| BranchesList SlKernCVS::Branches::getBuildBranches |
( |
std::string_view | branchesConf | ) |
|
|
staticnoexcept |
Convert branchesConf to a list of branches which are built.
- Parameters
-
| branchesConf | branches.conf to parse |
- Returns
- List of built branches.
◆ map()
Obtain whole branch map.
- Returns
- Branch mapping.
◆ merges()
| const BranchesList & SlKernCVS::Branches::merges |
( |
std::string_view | branch | ) |
const |
|
inline |
Immediate branches that the specified branch merges.
- Parameters
-
| branch | Branch to find children of |
- Returns
- BranchesList of branches merged into
branch.
◆ mergesClosure()
| BranchesSet SlKernCVS::Branches::mergesClosure |
( |
std::string_view | branch | ) |
const |
Closure of branches that the specified branch merges.
- Parameters
-
| branch | Branch to find children of |
- Returns
- Transitive BranchesSet of branches merged into
branch.
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/slhelpers-20260428.f233ce9-build/slhelpers-20260428.f233ce9/include/kerncvs/Branches.h