changeset 4319:10cff43c7bd9

pull requests: store symbolic reference in other_ref ... but ref of ancestor This both shows correct info and gives correct diff.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 28 Jun 2013 11:50:13 +0200
parents afbd43437237
children 486cd40776c2
files kallithea/controllers/pullrequests.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py	Tue Dec 10 19:30:37 2013 +0100
+++ b/kallithea/controllers/pullrequests.py	Fri Jun 28 11:50:13 2013 +0200
@@ -370,7 +370,12 @@
         org_repo = _form['org_repo']
         org_ref = _form['org_ref'] # will end with merge_rev but have symbolic name
         other_repo = _form['other_repo']
-        other_ref = 'rev:ancestor:%s' % _form['ancestor_rev'] # could be calculated from other_ref ...
+        other_ref = _form['other_ref'] # will have symbolic name and head revision
+        ancestor_rev = _form['ancestor_rev'] # revision number of ancestor
+        # hack: ancestor_rev is not an other_ref but we want to show the
+        # requested destination and have the exact ancestor
+        other_ref = other_ref.rsplit(':', 1)[0] + ':' + ancestor_rev
+
         revisions = [x for x in reversed(_form['revisions'])]
         reviewers = _form['review_members']