##// END OF EJS Templates
small fixes for git support
marcink -
r1281:0d3706cc beta
parent child Browse files
Show More
@@ -84,7 +84,7 b' class ChangelogController(BaseRepoContro'
84 84 :param size: number of commits to show
85 85 :param p: page number
86 86 """
87 if not repo.revisions or repo.alias == 'git':
87 if not repo.revisions:
88 88 c.jsdata = json.dumps([])
89 89 return
90 90
@@ -93,12 +93,19 b' class ChangelogController(BaseRepoContro'
93 93 rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
94 94 rev_end = max(0, rev_start - revcount)
95 95
96 dag = graph_rev(repo._repo, rev_start, rev_end)
97 c.dag = tree = list(colored(dag))
98 96 data = []
99 for (id, type, ctx, vtx, edges) in tree:
100 if type != CHANGESET:
101 continue
102 data.append(('', vtx, edges))
97 if repo.alias == 'git':
98 for _ in xrange(rev_end, rev_start):
99 vtx = [0, 1]
100 edges = [[0, 0, 1]]
101 data.append(['', vtx, edges])
102
103 elif repo.alias == 'hg':
104 dag = graph_rev(repo._repo, rev_start, rev_end)
105 c.dag = tree = list(colored(dag))
106 for (id, type, ctx, vtx, edges) in tree:
107 if type != CHANGESET:
108 continue
109 data.append(['', vtx, edges])
103 110
104 111 c.jsdata = json.dumps(data)
@@ -134,13 +134,13 b' class SummaryController(BaseRepoControll'
134 134
135 135 if stats and stats.languages:
136 136 c.no_data = False is dbrepo.enable_statistics
137 lang_stats = json.loads(stats.languages)
137 lang_stats_d = json.loads(stats.languages)
138 138 c.commit_data = stats.commit_activity
139 139 c.overview_data = stats.commit_activity_combined
140 140
141 141 lang_stats = [(x, {"count": y,
142 142 "desc": LANGUAGES_EXTENSIONS_MAP.get(x)})
143 for x, y in lang_stats.items()]
143 for x, y in lang_stats_d.items()]
144 144
145 145 c.trending_languages = json.dumps(OrderedDict(
146 146 sorted(lang_stats, reverse=True,
@@ -130,7 +130,7 b''
130 130 <label>${_('Clone url')}:</label>
131 131 </div>
132 132 <div class="input-short">
133 <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
133 <input type="text" id="clone_url" readonly="readonly" value="${c.rhodecode_repo.alias} clone ${c.clone_repo_url}" size="70"/>
134 134 </div>
135 135 </div>
136 136
General Comments 0
You need to be logged in to leave comments. Login now