class documentation
class RpmGitRepository(PkgGitRepository):
A git repository that holds the source of an RPM package
Static Method | version |
Generate a tag from a given format and a version |
Method | __init__ |
Undocumented |
Method | find |
Check if a certain version is stored in this repo and return the SHA1 of the related commit. That is, an annotated tag is dereferenced to the commit object it points to. |
Method | has |
Whether the repo has a pristine-tar branch. |
Instance Variable | pristine |
Undocumented |
Property | pristine |
The name of the pristine-tar branch, whether it already exists or not. |
Static Method | _sanitize |
sanitize a version so git accepts it as a tag |
Inherited from PkgGitRepository
:
Static Method | sanitize |
Make sure git-archive prefix ends with a slash |
Method | archive |
Create a compressed source tree archive with the given options |
Method | _archive |
Create a compressed source tree archive without submodules |
Method | _archive |
Create a compressed source tree archive with submodules. |
Generate a tag from a given format and a version
Parameters | |
format:str | tag pattern |
str | arguments for format string ('upstreamversion', 'release', 'vendor'...) |
Returns | |
version tag >>> RpmGitRepository.version_to_tag("packaging/%(version)s", dict(epoch='0', upstreamversion='0~0')) 'packaging/0%0_0' >>> RpmGitRepository.version_to_tag("%(vendor)s/v%(version)s", dict(upstreamversion='1.0', release='2', vendor="myvendor")) 'myvendor/v1.0-2' |
Check if a certain version is stored in this repo and return the SHA1 of the related commit. That is, an annotated tag is dereferenced to the commit object it points to.
Parameters | |
format:str | tag pattern |
str | arguments for format string ('upstreamversion', 'release', 'vendor'...) |
Returns | |
sha1 of the commit the tag references to |
Whether the repo has a pristine-tar branch.
Returns | |
Bool | True if the repo has pristine-tar commits already, False otherwise |