##// END OF EJS Templates
compare: rename optional compare_url parameter repo to other_repo...
Mads Kiilerich -
r3317:b36285f9 beta
parent child Browse files
Show More
@@ -88,15 +88,16 b' class CompareController(BaseRepoControll'
88 org_repo = c.rhodecode_db_repo.repo_name
88 org_repo = c.rhodecode_db_repo.repo_name
89 org_ref = (org_ref_type, org_ref)
89 org_ref = (org_ref_type, org_ref)
90 other_ref = (other_ref_type, other_ref)
90 other_ref = (other_ref_type, other_ref)
91 other_repo = request.GET.get('repo', org_repo)
91 other_repo = request.GET.get('other_repo', org_repo)
92 c.fulldiff = fulldiff = request.GET.get('fulldiff')
92 c.fulldiff = fulldiff = request.GET.get('fulldiff')
93 rev_start = request.GET.get('rev_start')
93 rev_start = request.GET.get('rev_start')
94 rev_end = request.GET.get('rev_end')
94 rev_end = request.GET.get('rev_end')
95
95
96 c.swap_url = h.url('compare_url', repo_name=other_repo,
96 c.swap_url = h.url('compare_url', as_form=request.GET.get('as_form'),
97 repo_name=other_repo,
97 org_ref_type=other_ref[0], org_ref=other_ref[1],
98 org_ref_type=other_ref[0], org_ref=other_ref[1],
98 other_ref_type=org_ref[0], other_ref=org_ref[1],
99 repo=org_repo,
99 repo=org_repo, as_form=request.GET.get('as_form'))
100 other_ref_type=org_ref[0], other_ref=org_ref[1])
100
101
101 c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
102 c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
102 c.other_repo = other_repo = Repository.get_by_repo_name(other_repo)
103 c.other_repo = other_repo = Repository.get_by_repo_name(other_repo)
@@ -220,7 +220,7 b''
220 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
220 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
221 %endif
221 %endif
222 %if c.rhodecode_db_repo.fork:
222 %if c.rhodecode_db_repo.fork:
223 <li>${h.link_to(_('compare fork'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name),class_='compare_request')}</li>
223 <li>${h.link_to(_('compare fork'),h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_repo=c.rhodecode_db_repo.fork.repo_name,other_ref_type='branch',other_ref='default'),class_='compare_request')}</li>
224 %endif
224 %endif
225 <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
225 <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
226 <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
226 <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
@@ -37,7 +37,7 b''
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
39 %if c.rhodecode_db_repo.fork:
39 %if c.rhodecode_db_repo.fork:
40 <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork with parent')}</a>
40 <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref=request.GET.get('branch') or 'default',other_repo=c.rhodecode_db_repo.fork.repo_name,other_ref_type='branch',other_ref='default')}" class="ui-btn small">${_('Compare fork with parent')}</a>
41 %endif
41 %endif
42 %if h.is_hg(c.rhodecode_repo):
42 %if h.is_hg(c.rhodecode_repo):
43 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a>
43 <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a>
@@ -17,7 +17,7 b''
17 <div class="follower_date">${_('forked')} -
17 <div class="follower_date">${_('forked')} -
18 <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
18 <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
19 <a title="${_('compare fork with %s' % c.repo_name)}"
19 <a title="${_('compare fork with %s' % c.repo_name)}"
20 href="${h.url('compare_url',repo_name=f.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default', repo=c.repo_name)}"
20 href="${h.url('compare_url',repo_name=f.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref='default')}"
21 class="ui-btn small">${_('Compare fork')}</a>
21 class="ui-btn small">${_('Compare fork')}</a>
22 </div>
22 </div>
23 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
23 <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
@@ -141,8 +141,8 b''
141 var url = "${h.url('compare_url',
141 var url = "${h.url('compare_url',
142 repo_name='org_repo',
142 repo_name='org_repo',
143 org_ref_type='org_ref_type', org_ref='org_ref',
143 org_ref_type='org_ref_type', org_ref='org_ref',
144 other_repo='other_repo',
144 other_ref_type='other_ref_type', other_ref='other_ref',
145 other_ref_type='other_ref_type', other_ref='other_ref',
145 repo='other_repo',
146 as_form=True,
146 as_form=True,
147 rev_start=request.GET.get('rev_start',''),
147 rev_start=request.GET.get('rev_start',''),
148 rev_end=request.GET.get('rev_end',''))}";
148 rev_end=request.GET.get('rev_end',''))}";
@@ -92,9 +92,9 b' class TestCompareController(TestControll'
92 repo_name=repo2.repo_name,
92 repo_name=repo2.repo_name,
93 org_ref_type="branch",
93 org_ref_type="branch",
94 org_ref=rev1,
94 org_ref=rev1,
95 other_repo=repo1.repo_name,
95 other_ref_type="branch",
96 other_ref_type="branch",
96 other_ref=rev2,
97 other_ref=rev2,
97 repo=repo1.repo_name
98 ))
98 ))
99
99
100 try:
100 try:
@@ -150,9 +150,9 b' class TestCompareController(TestControll'
150 repo_name=repo2.repo_name,
150 repo_name=repo2.repo_name,
151 org_ref_type="branch",
151 org_ref_type="branch",
152 org_ref=rev1,
152 org_ref=rev1,
153 other_repo=repo1.repo_name,
153 other_ref_type="branch",
154 other_ref_type="branch",
154 other_ref=rev2,
155 other_ref=rev2,
155 repo=repo1.repo_name
156 ))
156 ))
157
157
158 try:
158 try:
General Comments 0
You need to be logged in to leave comments. Login now