##// 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 :param size: number of commits to show
84 :param size: number of commits to show
85 :param p: page number
85 :param p: page number
86 """
86 """
87 if not repo.revisions or repo.alias == 'git':
87 if not repo.revisions:
88 c.jsdata = json.dumps([])
88 c.jsdata = json.dumps([])
89 return
89 return
90
90
@@ -93,12 +93,19 b' class ChangelogController(BaseRepoContro'
93 rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
93 rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
94 rev_end = max(0, rev_start - revcount)
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 data = []
96 data = []
99 for (id, type, ctx, vtx, edges) in tree:
97 if repo.alias == 'git':
100 if type != CHANGESET:
98 for _ in xrange(rev_end, rev_start):
101 continue
99 vtx = [0, 1]
102 data.append(('', vtx, edges))
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 c.jsdata = json.dumps(data)
111 c.jsdata = json.dumps(data)
@@ -134,13 +134,13 b' class SummaryController(BaseRepoControll'
134
134
135 if stats and stats.languages:
135 if stats and stats.languages:
136 c.no_data = False is dbrepo.enable_statistics
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 c.commit_data = stats.commit_activity
138 c.commit_data = stats.commit_activity
139 c.overview_data = stats.commit_activity_combined
139 c.overview_data = stats.commit_activity_combined
140
140
141 lang_stats = [(x, {"count": y,
141 lang_stats = [(x, {"count": y,
142 "desc": LANGUAGES_EXTENSIONS_MAP.get(x)})
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 c.trending_languages = json.dumps(OrderedDict(
145 c.trending_languages = json.dumps(OrderedDict(
146 sorted(lang_stats, reverse=True,
146 sorted(lang_stats, reverse=True,
@@ -130,7 +130,7 b''
130 <label>${_('Clone url')}:</label>
130 <label>${_('Clone url')}:</label>
131 </div>
131 </div>
132 <div class="input-short">
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 </div>
134 </div>
135 </div>
135 </div>
136
136
General Comments 0
You need to be logged in to leave comments. Login now