##// END OF EJS Templates
pullrequest: pullrequest from changelog view...
Mads Kiilerich -
r3485:b19b1723 beta
parent child Browse files
Show More
@@ -121,12 +121,17 b' class PullrequestsController(BaseRepoCon'
121 category='warning')
121 category='warning')
122 redirect(url('summary_home', repo_name=org_repo.repo_name))
122 redirect(url('summary_home', repo_name=org_repo.repo_name))
123
123
124 org_rev = request.GET.get('rev_end')
125 # rev_start is not directly useful - its parent could however be used
126 # as default for other and thus give a simple compare view
127 #other_rev = request.POST.get('rev_start')
128
124 other_repos_info = {}
129 other_repos_info = {}
125
130
126 c.org_repos = []
131 c.org_repos = []
127 c.org_repos.append((org_repo.repo_name, org_repo.repo_name))
132 c.org_repos.append((org_repo.repo_name, org_repo.repo_name))
128 c.default_org_repo = org_repo.repo_name
133 c.default_org_repo = org_repo.repo_name
129 c.org_refs, c.default_org_ref = self._get_repo_refs(org_repo.scm_instance)
134 c.org_refs, c.default_org_ref = self._get_repo_refs(org_repo.scm_instance, org_rev)
130
135
131 c.other_repos = []
136 c.other_repos = []
132 # add org repo to other so we can open pull request against itself
137 # add org repo to other so we can open pull request against itself
@@ -197,17 +202,6 b' class PullrequestsController(BaseRepoCon'
197 revisions = _form['revisions']
202 revisions = _form['revisions']
198 reviewers = _form['review_members']
203 reviewers = _form['review_members']
199
204
200 # if we have cherry picked pull request we don't care what is in
201 # org_ref/other_ref
202 rev_start = request.POST.get('rev_start')
203 rev_end = request.POST.get('rev_end')
204
205 if rev_start and rev_end:
206 # this is swapped to simulate that rev_end is a revision from
207 # parent of the fork
208 org_ref = 'rev:%s:%s' % (rev_end, rev_end)
209 other_ref = 'rev:%s:%s' % (rev_start, rev_start)
210
211 title = _form['pullrequest_title']
205 title = _form['pullrequest_title']
212 description = _form['pullrequest_desc']
206 description = _form['pullrequest_desc']
213
207
@@ -32,7 +32,7 b''
32 <canvas id="graph_canvas"></canvas>
32 <canvas id="graph_canvas"></canvas>
33 </div>
33 </div>
34 <div id="graph_content">
34 <div id="graph_content">
35 <div class="info_box" style="clear: both;padding: 10px 6px;text-align: right;">
35 <div class="info_box" style="clear: both;padding: 10px 6px;min-height: 12px;text-align: right;">
36 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
36 <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
37 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
37 <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
38
38
@@ -160,11 +160,15 b''
160 }
160 }
161 }
161 }
162 if(YUD.get('open_new_pr')){
162 if(YUD.get('open_new_pr')){
163 if(checked_checkboxes.length>0){
163 if(checked_checkboxes.length>1){
164 // modify open pull request to show we have selected cs
164 YUD.setStyle('open_new_pr','display','none');
165 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
165 } else {
166 }else{
166 YUD.setStyle('open_new_pr','display','');
167 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
167 if(checked_checkboxes.length>0){
168 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request for selected changesets'];
169 }else{
170 YUD.get('open_new_pr').innerHTML = _TM['Open new pull request'];
171 }
168 }
172 }
169 }
173 }
170
174
@@ -191,6 +195,7 b''
191 else{
195 else{
192 YUD.setStyle('rev_range_container','display','none');
196 YUD.setStyle('rev_range_container','display','none');
193 YUD.setStyle('rev_range_clear','display','none');
197 YUD.setStyle('rev_range_clear','display','none');
198 YUD.get('open_new_pr').href = pr_tmpl
194 YUD.setStyle('compare_fork','display','');
199 YUD.setStyle('compare_fork','display','');
195 }
200 }
196 };
201 };
General Comments 0
You need to be logged in to leave comments. Login now