1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-26 08:08:55 +02:00

Add Package.get_revision_list() for listing commit log

This commit is contained in:
2024-04-17 10:51:46 +02:00
parent eb2678e0c7
commit 89f74665d1
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
from ..util.models import * # pylint: disable=wildcard-import,unused-wildcard-import
class PackageRevision(XmlModel):
XML_TAG = "revision"
rev: int = Field(
xml_attribute=True,
)
vrev: Optional[int] = Field(
xml_attribute=True,
)
srcmd5: str = Field(
)
version: str = Field(
)
time: int = Field(
)
user: str = Field(
)
comment: Optional[str] = Field(
)
requestid: Optional[int] = Field(
)
def get_time_str(self):
import time
return time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(self.time))