Mercurial > kallithea
comparison kallithea/controllers/branches.py @ 4196:06e49be38d78 kallithea-2.2.5-rebrand
Rename rhodecode_repo to db_repo_scm_instance
author | Bradley M. Kuhn <bkuhn@sfconservancy.org> |
---|---|
date | Wed, 02 Jul 2014 19:05:00 -0400 |
parents | 9581233e9275 |
children | ad38f9f93b3b |
comparison
equal
deleted
inserted
replaced
4195:9581233e9275 | 4196:06e49be38d78 |
---|---|
52 tip = heads[-1] | 52 tip = heads[-1] |
53 if 'close' in localrepo.changelog.read(tip)[5]: | 53 if 'close' in localrepo.changelog.read(tip)[5]: |
54 bt_closed[bn] = tip | 54 bt_closed[bn] = tip |
55 return bt_closed | 55 return bt_closed |
56 | 56 |
57 cs_g = c.rhodecode_repo.get_changeset | 57 cs_g = c.db_repo_scm_instance.get_changeset |
58 | 58 |
59 c.repo_closed_branches = {} | 59 c.repo_closed_branches = {} |
60 if c.db_repo.repo_type == 'hg': | 60 if c.db_repo.repo_type == 'hg': |
61 bt_closed = _branchtags(c.rhodecode_repo._repo) | 61 bt_closed = _branchtags(c.db_repo_scm_instance._repo) |
62 _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),) | 62 _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),) |
63 for n, h in bt_closed.items()] | 63 for n, h in bt_closed.items()] |
64 | 64 |
65 c.repo_closed_branches = OrderedDict(sorted(_closed_branches, | 65 c.repo_closed_branches = OrderedDict(sorted(_closed_branches, |
66 key=lambda ctx: ctx[0], | 66 key=lambda ctx: ctx[0], |
67 reverse=False)) | 67 reverse=False)) |
68 | 68 |
69 _branches = [(safe_unicode(n), cs_g(h)) | 69 _branches = [(safe_unicode(n), cs_g(h)) |
70 for n, h in c.rhodecode_repo.branches.items()] | 70 for n, h in c.db_repo_scm_instance.branches.items()] |
71 c.repo_branches = OrderedDict(sorted(_branches, | 71 c.repo_branches = OrderedDict(sorted(_branches, |
72 key=lambda ctx: ctx[0], | 72 key=lambda ctx: ctx[0], |
73 reverse=False)) | 73 reverse=False)) |
74 | 74 |
75 return render('branches/branches.html') | 75 return render('branches/branches.html') |