diff --git a/tools/repostats.py b/tools/repostats.py
index e2f2b4de..706836cc 100755
--- a/tools/repostats.py
+++ b/tools/repostats.py
@@ -18,6 +18,8 @@ import gettext
__trans = gettext.translation('pisi', fallback=True)
_ = __trans.ugettext
+from svn import core, client
+
sys.path.append('.')
import pisi.specfile
import pisi.uri
@@ -131,6 +133,7 @@ def_source_html = u"""
%(license)s
İşlemler:
+Paket dosyalarına bak
Hata kayıtlarına bak
@@ -180,6 +183,19 @@ def_missing_html = u"""
"""
+def svn_uri(path):
+ # init
+ core.apr_initialize()
+ pool = core.svn_pool_create(None)
+ core.svn_config_ensure(None, pool)
+ # get commit date
+ uri = client.svn_client_url_from_path(path, pool)
+ # cleanup
+ core.svn_pool_destroy(pool)
+ core.apr_terminate()
+ return uri
+
+
# FIXME: This check should be in specfile
valid_filetypes = [
"executable",
@@ -388,6 +404,7 @@ class Source:
self.spec = spec
self.name = name
self.path = path
+ self.uri = svn_uri(path)
for p in spec.packages:
Package(self, p)
self.checkRelease()
@@ -443,7 +460,8 @@ class Source:
"history": template_table("history", histdata),
"packages": "
".join(paks),
"summary": source.summary,
- "patches": "
".join(ptch)
+ "patches": "
".join(ptch),
+ "uri": self.uri
}
template_write("paksite/source-%s.html" % self.name, "source", dict)