diff --git a/rhodecode/templates/pullrequests/pullrequest.html b/rhodecode/templates/pullrequests/pullrequest.html --- a/rhodecode/templates/pullrequests/pullrequest.html +++ b/rhodecode/templates/pullrequests/pullrequest.html @@ -53,7 +53,7 @@ gravatar - ${h.select('other_repo',c.default_pull_request ,c.other_repos,class_='refs')}:${h.select('other_ref','',c.default_revs,class_='refs')} + ${h.select('other_repo',c.default_pull_request ,c.other_repos,class_='refs')}:${h.select('other_ref',c.default_pull_request_rev,c.default_revs,class_='refs')}
@@ -146,25 +146,29 @@ as_form=True)}"; var select_refs = YUQ('#pull_request_form select.refs') - + var rev_data = {}; // gather the org/other ref and repo here for(var i=0;i1){ key = select_ref.name+"_type"; val = select_ref_data[0]; url = url.replace(key,val); - + rev_data[key] = val; + key = select_ref.name; val = select_ref_data[1]; url = url.replace(key,val); - + rev_data[key] = val; + }else{ key = select_ref.name; val = select_ref.value; url = url.replace(key,val); + rev_data[key] = val; } } @@ -182,6 +186,8 @@ YUD.get('other_repo_gravatar').src = other_repos_info[repo_name]['gravatar']; YUD.get('other_repo_desc').innerHTML = other_repos_info[repo_name]['description']; YUD.get('other_ref').innerHTML = other_repos_info[repo_name]['revs']; + // select back the revision that was just compared + setSelectValue(YUD.get('other_ref'), rev_data['other_ref']); }) } YUE.on('refresh','click',function(e){