diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py --- a/kallithea/controllers/changeset.py +++ b/kallithea/controllers/changeset.py @@ -39,6 +39,7 @@ from kallithea.lib.utils import jsonify from kallithea.lib.vcs.exceptions import RepositoryError, \ ChangesetDoesNotExistError +from kallithea.lib.compat import json import kallithea.lib.helpers as h from kallithea.lib.auth import LoginRequired, HasRepoPermissionAnyDecorator,\ NotAnonymous @@ -55,6 +56,7 @@ from kallithea.lib.diffs import LimitedD from kallithea.lib.exceptions import StatusChangeOnClosedPullRequestError from kallithea.lib.vcs.backends.base import EmptyChangeset from kallithea.lib.utils2 import safe_unicode, safe_str +from kallithea.lib.graphmod import graph_data log = logging.getLogger(__name__) @@ -313,6 +315,8 @@ class ChangesetController(BaseRepoContro return render('changeset/changeset.html') else: c.cs_ranges_org = None + revs = [ctx.revision for ctx in reversed(c.cs_ranges)] + c.jsdata = json.dumps(graph_data(c.db_repo_scm_instance, revs)) return render('changeset/changeset_range.html') @LoginRequired() diff --git a/kallithea/controllers/pullrequests.py b/kallithea/controllers/pullrequests.py --- a/kallithea/controllers/pullrequests.py +++ b/kallithea/controllers/pullrequests.py @@ -60,6 +60,7 @@ from kallithea.lib.utils2 import safe_in from kallithea.controllers.changeset import anchor_url, _ignorews_url,\ _context_url, get_line_ctx, get_ignore_ws from kallithea.controllers.compare import CompareController +from kallithea.lib.graphmod import graph_data log = logging.getLogger(__name__) @@ -200,6 +201,8 @@ class PullrequestsController(BaseRepoCon org_scm_instance = c.org_repo.scm_instance # property with expensive cache invalidation check!!! c.cs_ranges = [org_scm_instance.get_changeset(x) for x in pull_request.revisions] c.cs_ranges_org = None # not stored and not important and moving target - could be calculated ... + revs = [ctx.revision for ctx in reversed(c.cs_ranges)] + c.jsdata = json.dumps(graph_data(org_scm_instance, revs)) c.statuses = c.org_repo.statuses([x.raw_id for x in c.cs_ranges]) diff --git a/kallithea/templates/compare/compare_cs.html b/kallithea/templates/compare/compare_cs.html --- a/kallithea/templates/compare/compare_cs.html +++ b/kallithea/templates/compare/compare_cs.html @@ -10,9 +10,15 @@ %endif +
|
%if cs.raw_id in c.statuses:
@@ -36,6 +42,9 @@
|