X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/03c5ba6e50339d7bc470eb6d7f051483eff1e96b..1b8ab1430082a145a3e4807de837dcc1568178a3:/lib/vstorage.py diff --git a/lib/vstorage.py b/lib/vstorage.py index 02f05039..527a245d 100644 --- a/lib/vstorage.py +++ b/lib/vstorage.py @@ -1,4 +1,8 @@ # -*- coding: utf-8 -*- +# +# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import os import tempfile import datetime @@ -350,7 +354,14 @@ class VersionedStorage(object): author = unicode(filectx.user(), "utf-8", 'replace').split('<')[0].strip() comment = unicode(filectx.description(), "utf-8", 'replace') - yield {"version": rev, "date": date, "author": author, "description": comment} + tags = filectx.changectx().tags() + yield { + "version": rev, + "date": date, + "author": author, + "description": comment, + "tag": tags[0] if tags else None, + } def page_revision(self, title, rev): """Get unicode contents of specified revision of the page."""