Mercurial > kallithea
comparison pylons_app/model/hg_model.py @ 93:aec4c0071cb3
added empty controllers for branches tags files graph, routing and test for them
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 21 Apr 2010 00:26:11 +0200 |
parents | 670713507d03 |
children | a214462101d2 |
comparison
equal
deleted
inserted
replaced
92:2968fb635787 | 93:aec4c0071cb3 |
---|---|
13 from pylons.controllers.util import abort | 13 from pylons.controllers.util import abort |
14 try: | 14 try: |
15 from vcs.backends.hg import get_repositories, MercurialRepository | 15 from vcs.backends.hg import get_repositories, MercurialRepository |
16 except ImportError: | 16 except ImportError: |
17 print 'You have to import vcs module' | 17 print 'You have to import vcs module' |
18 raise | |
18 | 19 |
19 class HgModel(object): | 20 class HgModel(object): |
20 """ | 21 """ |
21 Mercurial Model | 22 Mercurial Model |
22 """ | 23 """ |
47 tmp_d['tip'] = str(tip) | 48 tmp_d['tip'] = str(tip) |
48 tmp_d['tip_sort'] = tip.rev() | 49 tmp_d['tip_sort'] = tip.rev() |
49 tmp_d['rev'] = tip.rev() | 50 tmp_d['rev'] = tip.rev() |
50 tmp_d['contact'] = mercurial_repo.contact | 51 tmp_d['contact'] = mercurial_repo.contact |
51 tmp_d['contact_sort'] = tmp_d['contact'] | 52 tmp_d['contact_sort'] = tmp_d['contact'] |
52 tmp_d['repo_archives'] = mercurial_repo._get_archives() | 53 tmp_d['repo_archives'] = list(mercurial_repo._get_archives()) |
53 | 54 |
54 yield tmp_d | 55 yield tmp_d |
55 | 56 |
56 def get_repo(self, repo_name): | 57 def get_repo(self, repo_name): |
57 path = g.paths[0][1].replace('*', '') | 58 path = g.paths[0][1].replace('*', '') |