diff --git a/rhodecode/controllers/changelog.py b/rhodecode/controllers/changelog.py --- a/rhodecode/controllers/changelog.py +++ b/rhodecode/controllers/changelog.py @@ -84,7 +84,7 @@ class ChangelogController(BaseRepoContro :param size: number of commits to show :param p: page number """ - if not repo.revisions or repo.alias == 'git': + if not repo.revisions: c.jsdata = json.dumps([]) return @@ -93,12 +93,19 @@ class ChangelogController(BaseRepoContro rev_start = repo.revisions.index(repo.revisions[(-1 * offset)]) rev_end = max(0, rev_start - revcount) - dag = graph_rev(repo._repo, rev_start, rev_end) - c.dag = tree = list(colored(dag)) data = [] - for (id, type, ctx, vtx, edges) in tree: - if type != CHANGESET: - continue - data.append(('', vtx, edges)) + if repo.alias == 'git': + for _ in xrange(rev_end, rev_start): + vtx = [0, 1] + edges = [[0, 0, 1]] + data.append(['', vtx, edges]) + + elif repo.alias == 'hg': + dag = graph_rev(repo._repo, rev_start, rev_end) + c.dag = tree = list(colored(dag)) + for (id, type, ctx, vtx, edges) in tree: + if type != CHANGESET: + continue + data.append(['', vtx, edges]) c.jsdata = json.dumps(data) diff --git a/rhodecode/controllers/summary.py b/rhodecode/controllers/summary.py --- a/rhodecode/controllers/summary.py +++ b/rhodecode/controllers/summary.py @@ -134,13 +134,13 @@ class SummaryController(BaseRepoControll if stats and stats.languages: c.no_data = False is dbrepo.enable_statistics - lang_stats = json.loads(stats.languages) + lang_stats_d = json.loads(stats.languages) c.commit_data = stats.commit_activity c.overview_data = stats.commit_activity_combined lang_stats = [(x, {"count": y, "desc": LANGUAGES_EXTENSIONS_MAP.get(x)}) - for x, y in lang_stats.items()] + for x, y in lang_stats_d.items()] c.trending_languages = json.dumps(OrderedDict( sorted(lang_stats, reverse=True, diff --git a/rhodecode/templates/summary/summary.html b/rhodecode/templates/summary/summary.html --- a/rhodecode/templates/summary/summary.html +++ b/rhodecode/templates/summary/summary.html @@ -130,7 +130,7 @@
- +