diff pylons_app/model/hg_model.py @ 74:cdf4fda66dd9

Started summary page. Added filters to templates. used by n,self.f.filtername prefixed by n to disable other filters. Few other fixes found
author Marcin Kuzminski <marcin@python-blog.com>
date Mon, 12 Apr 2010 10:29:18 +0200
parents 55d7f2502dfb
children 928416088790
line wrap: on
line diff
--- a/pylons_app/model/hg_model.py	Sun Apr 11 22:57:16 2010 +0200
+++ b/pylons_app/model/hg_model.py	Mon Apr 12 10:29:18 2010 +0200
@@ -12,7 +12,7 @@
 from pylons import tmpl_context as c, app_globals as g, session, request, config
 from pylons.controllers.util import abort
 try:
-    from vcs.backends.hg import get_repositories
+    from vcs.backends.hg import get_repositories, MercurialRepository
 except ImportError:
     print 'You have to import vcs module'
 from mercurial.templatefilters import age
@@ -53,3 +53,8 @@
             tmp_d['repo_archives'] = mercurial_repo._get_archive_list()
             
             yield tmp_d
+
+    def get_repo(self, repo_name):
+        path = g.paths[0][1]
+        repo = MercurialRepository(os.path.join(path, repo_name), g.baseui)
+        return repo