Show More
@@ -46,31 +46,28 b' class BranchesController(BaseRepoControl' | |||
|
46 | 46 | def index(self): |
|
47 | 47 | |
|
48 | 48 | def _branchtags(localrepo): |
|
49 | ||
|
50 | bt = {} | |
|
51 | 49 | bt_closed = {} |
|
52 | ||
|
53 | 50 | for bn, heads in localrepo.branchmap().iteritems(): |
|
54 | 51 | tip = heads[-1] |
|
55 |
if 'close' |
|
|
56 | bt[bn] = tip | |
|
57 | else: | |
|
52 | if 'close' in localrepo.changelog.read(tip)[5]: | |
|
58 | 53 | bt_closed[bn] = tip |
|
59 |
return |
|
|
54 | return bt_closed | |
|
60 | 55 | |
|
56 | cs_g = c.rhodecode_repo.get_changeset | |
|
61 | 57 | |
|
62 | bt, bt_closed = _branchtags(c.rhodecode_repo._repo) | |
|
63 | cs_g = c.rhodecode_repo.get_changeset | |
|
64 | _branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),) for n, h in | |
|
65 | bt.items()] | |
|
58 | c.repo_closed_branches = {} | |
|
59 | if c.rhodecode_db_repo.repo_type == 'hg': | |
|
60 | bt_closed = _branchtags(c.rhodecode_repo._repo) | |
|
61 | _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),) | |
|
62 | for n, h in bt_closed.items()] | |
|
66 | 63 | |
|
67 | _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),) for n, h in | |
|
68 | bt_closed.items()] | |
|
69 | ||
|
70 | c.repo_branches = OrderedDict(sorted(_branches, | |
|
64 | c.repo_closed_branches = OrderedDict(sorted(_closed_branches, | |
|
71 | 65 | key=lambda ctx: ctx[0], |
|
72 | 66 | reverse=False)) |
|
73 | c.repo_closed_branches = OrderedDict(sorted(_closed_branches, | |
|
67 | ||
|
68 | _branches = [(safe_unicode(n), cs_g(h)) | |
|
69 | for n, h in c.rhodecode_repo.branches.items()] | |
|
70 | c.repo_branches = OrderedDict(sorted(_branches, | |
|
74 | 71 |
|
|
75 | 72 |
|
|
76 | 73 |
General Comments 0
You need to be logged in to leave comments.
Login now