diff --git a/tools/repostats.py b/tools/repostats.py index edf39b05..5a8cf078 100755 --- a/tools/repostats.py +++ b/tools/repostats.py @@ -71,10 +71,14 @@ def_packager_html = u""" -

%(name)s <%(email)s>

-

Paketler:

+

%(name)s <%(email)s>

+ +

Paketler:

%(sources)s

+

Güncellemeler:

+

%(updates)s

+ """ @@ -136,6 +140,9 @@ Hata kayıtlarına bak

Tarihçe

%(history)s +

Yamalar

+%(patches)s + """ @@ -422,6 +429,7 @@ class Source: paks = map(lambda x: "%s" % (x, x), (map(lambda x: x.name, self.spec.packages))) histdata = map(lambda x: (x.release, x.date, x.name, x.name, x.comment), self.spec.history) + ptch = map(lambda x: x.filename, source.patches) dict = { "name": self.name, "homepage": source.homepage, @@ -430,28 +438,44 @@ class Source: "release": source.release, "history": template_table("history", histdata), "packages": "
".join(paks), - "summary": source.summary + "summary": source.summary, + "patches": "
".join(ptch) } template_write("paksite/source-%s.html" % self.name, "source", dict) class Packager: - def __init__(self, spec): - name = spec.source.packager.name - email = spec.source.packager.email + def __init__(self, spec, update=None): + if update: + name = update.name + email = update.email + else: + name = spec.source.packager.name + email = spec.source.packager.email if packagers.has_key(name): if email != packagers[name].email: e = _("Developer '%s <%s>' has another mail address '%s' in source package '%s'") % ( name, packagers[name].email, email, spec.source.name) packagers[name].errors.append(e) errors.append(e) - packagers[name].sources.append(spec.source.name) + if update: + packagers[name].updates.append((spec.source.name, update.release, update.comment)) + else: + packagers[name].sources.append(spec.source.name) else: packagers[name] = self self.name = name self.email = email - self.sources = [spec.source.name] + if update: + self.sources = [] + self.updates = [(spec.source.name, update.release, update.comment)] + else: + self.sources = [spec.source.name] + self.updates = [] self.errors = [] + if not update: + for update in spec.history: + Packager(spec, update) def report(self): printu(_("Packager: %s <%s>\n") % (self.name, self.email)) @@ -462,14 +486,20 @@ class Packager: printu(_(" Source packages (%d):\n") % len(self.sources)) for s in self.sources: printu(" %s\n" % s) + printu(_(" Updates (%d):\n") % len(self.updates)) + for s in self.updates: + printu(" %s (%s): %s\n" % s) def report_html(self): - srcs = map(lambda x: "%s" % (x, x), self.sources) + srcs = map(lambda x: "%s" % (x, x), self.sources) srcs.sort() + upds = map(lambda x: "%s (%s)
%s
" % ( + x[0], x[0], x[1], x[2]), self.updates) dict = { "name": self.name, "email": mangle_email(self.email), - "sources": "
".join(srcs) + "sources": "
".join(srcs), + "updates": " ".join(upds) } template_write("paksite/%s.html" % self.name, "packager", dict)