summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/models.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/models.py b/main/models.py
index f68e501..3ab2c36 100644
--- a/main/models.py
+++ b/main/models.py
@@ -256,6 +256,20 @@ class Package(models.Model):
self.deps_cache = deps
return deps
+ def get_svn_link(self):
+ linkbase = "http://repos.archlinux.org/viewvc.cgi/%s/repos/%s-%s/%s"
+ if self.pkgbase:
+ dirname = self.pkgbase
+ else:
+ dirname = self.pkgname
+ repo = self.repo.name.lower()
+ if repo.startswith('community'):
+ rootopt = '?root=community'
+ else:
+ rootopt = '?root=packages'
+ return linkbase % (dirname, repo, self.arch.name, rootopt)
+
+
class Signoff(models.Model):
pkg = models.ForeignKey(Package)
pkgver = models.CharField(max_length=255)