changeset 4934:d053efba3c0c

pullrequests: saving raw_id instead of branch in org_ref This fixes an issue when the pull request is created while the top commit included is not the tip. In that case, the faulty code would but branch:default:default as org_ref, that causes the pull request view to show all commits on that branch instead of the wanted commit(s) only. The fix will result in a branch:default:1234567890abcdef1234567890abcdef (e.g)
author Jan Heylen <jan.heylen@alcatel-lucent.com>
date Thu, 19 Mar 2015 13:13:06 +0100
parents 9c252005e5fd
children 6017996e4dcf
files kallithea/controllers/pullrequests.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/pullrequests.py	Sat Mar 21 16:55:52 2015 +0100
+++ b/kallithea/controllers/pullrequests.py	Thu Mar 19 13:13:06 2015 +0100
@@ -322,8 +322,8 @@
          org_rev) = org_ref.split(':')
         if org_ref_type == 'rev':
             org_ref_type = 'branch'
-            org_ref_name = org_repo.scm_instance.get_changeset(org_rev).branch
-            org_ref = '%s:%s:%s' % (org_ref_type, org_ref_name, org_ref_name)
+            cs = org_repo.scm_instance.get_changeset(org_rev)
+            org_ref = '%s:%s:%s' % (org_ref_type, cs.branch, cs.raw_id)
 
         other_repo_name = _form['other_repo']
         other_ref = _form['other_ref'] # will have symbolic name and head revision