# HG changeset patch # User Mads Kiilerich # Date 1386700237 -3600 # Node ID 67d5afe2fa1a968bfd1703c4f6e75b61f2109885 # Parent c733124b6262d460e0843ba6fee98fc859912190 pull requests: show graph when creating PR diff -r c733124b6262 -r 67d5afe2fa1a kallithea/controllers/compare.py --- a/kallithea/controllers/compare.py Tue Dec 10 19:30:37 2013 +0100 +++ b/kallithea/controllers/compare.py Tue Dec 10 19:30:37 2013 +0100 @@ -47,6 +47,8 @@ from kallithea.lib.diffs import LimitedDiffContainer from kallithea.controllers.changeset import anchor_url, _ignorews_url,\ _context_url, get_line_ctx, get_ignore_ws +from kallithea.lib.graphmod import graph_data +from kallithea.lib.compat import json log = logging.getLogger(__name__) @@ -271,6 +273,12 @@ c.statuses = c.db_repo.statuses( [x.raw_id for x in c.cs_ranges]) + revs = [ctx.revision for ctx in reversed(c.cs_ranges)] + c.jsdata = json.dumps(graph_data(c.other_repo.scm_instance, revs)) + + c.statuses = c.db_repo.statuses([x.raw_id for x in + c.cs_ranges]) + if partial: return render('compare/compare_cs.html') if merge and c.ancestor: diff -r c733124b6262 -r 67d5afe2fa1a kallithea/templates/compare/compare_cs.html --- a/kallithea/templates/compare/compare_cs.html Tue Dec 10 19:30:37 2013 +0100 +++ b/kallithea/templates/compare/compare_cs.html Tue Dec 10 19:30:37 2013 +0100 @@ -17,7 +17,7 @@
- %for cnt, cs in enumerate(c.cs_ranges): + %for cnt, cs in enumerate(reversed(c.cs_ranges)):
%if cs.raw_id in c.statuses: @@ -79,7 +79,9 @@ %endif -%if not c.as_form: +%if c.as_form: + +%else: %endif diff -r c733124b6262 -r 67d5afe2fa1a kallithea/templates/pullrequests/pullrequest.html --- a/kallithea/templates/pullrequests/pullrequest.html Tue Dec 10 19:30:37 2013 +0100 +++ b/kallithea/templates/pullrequests/pullrequest.html Tue Dec 10 19:30:37 2013 +0100 @@ -137,6 +137,7 @@ +