Changeset - b36285f90f89
[Not reviewed]
beta
0 6 0
Mads Kiilerich - 13 years ago 2013-02-01 23:13:10
madski@unity3d.com
Grafted from: 9591848d9328
compare: rename optional compare_url parameter repo to other_repo

At the same time it is placed before other_ref_type and other_ref. Just to keep
a logical flow and (a new) consistency that will help the next refactoring.
6 files changed with 12 insertions and 11 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -88,15 +88,16 @@ class CompareController(BaseRepoControll
 
        org_repo = c.rhodecode_db_repo.repo_name
 
        org_ref = (org_ref_type, org_ref)
 
        other_ref = (other_ref_type, other_ref)
 
        other_repo = request.GET.get('repo', org_repo)
 
        other_repo = request.GET.get('other_repo', org_repo)
 
        c.fulldiff = fulldiff = request.GET.get('fulldiff')
 
        rev_start = request.GET.get('rev_start')
 
        rev_end = request.GET.get('rev_end')
 

	
 
        c.swap_url = h.url('compare_url', repo_name=other_repo,
 
              org_ref_type=other_ref[0], org_ref=other_ref[1],
 
              other_ref_type=org_ref[0], other_ref=org_ref[1],
 
              repo=org_repo, as_form=request.GET.get('as_form'))
 
        c.swap_url = h.url('compare_url', as_form=request.GET.get('as_form'),
 
            repo_name=other_repo,
 
            org_ref_type=other_ref[0], org_ref=other_ref[1],
 
            repo=org_repo,
 
            other_ref_type=org_ref[0], other_ref=org_ref[1])
 

	
 
        c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
 
        c.other_repo = other_repo = Repository.get_by_repo_name(other_repo)
rhodecode/templates/base/base.html
Show inline comments
 
@@ -220,7 +220,7 @@
 
                 <li>${h.link_to(_('open new pull request'),h.url('pullrequest_home',repo_name=c.repo_name),class_='pull_request')}</li>
 
                %endif
 
                %if c.rhodecode_db_repo.fork:
 
                 <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>
 
                 <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>
 
                %endif
 
                <li>${h.link_to(_('lightweight changelog'),h.url('shortlog_home',repo_name=c.repo_name),class_='shortlog')}</li>
 
                <li>${h.link_to(_('search'),h.url('search_repo',repo_name=c.repo_name),class_='search')}</li>
rhodecode/templates/changelog/changelog.html
Show inline comments
 
@@ -37,7 +37,7 @@ ${_('%s Changelog') % c.repo_name} - ${c
 
                    <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 

	
 
                    %if c.rhodecode_db_repo.fork:
 
                        <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>
 
                        <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>
 
                    %endif
 
                    %if h.is_hg(c.rhodecode_repo):
 
                    <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('open new pull request')}</a>
rhodecode/templates/forks/forks_data.html
Show inline comments
 
@@ -17,7 +17,7 @@
 
            <div class="follower_date">${_('forked')} -
 
                <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
 
                <a title="${_('compare fork with %s' % c.repo_name)}"
 
                    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)}"
 
                    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')}"
 
                    class="ui-btn small">${_('Compare fork')}</a>
 
            </div>
 
            <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
rhodecode/templates/pullrequests/pullrequest.html
Show inline comments
 
@@ -141,8 +141,8 @@
 
      var url = "${h.url('compare_url',
 
                         repo_name='org_repo',
 
                         org_ref_type='org_ref_type', org_ref='org_ref',
 
                         other_repo='other_repo',
 
                         other_ref_type='other_ref_type', other_ref='other_ref',
 
                         repo='other_repo',
 
                         as_form=True,
 
                         rev_start=request.GET.get('rev_start',''),
 
                         rev_end=request.GET.get('rev_end',''))}";
rhodecode/tests/functional/test_compare.py
Show inline comments
 
@@ -92,9 +92,9 @@ class TestCompareController(TestControll
 
                                    repo_name=repo2.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref=rev1,
 
                                    other_repo=repo1.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref=rev2,
 
                                    repo=repo1.repo_name
 
                                    ))
 

	
 
        try:
 
@@ -150,9 +150,9 @@ class TestCompareController(TestControll
 
                                    repo_name=repo2.repo_name,
 
                                    org_ref_type="branch",
 
                                    org_ref=rev1,
 
                                    other_repo=repo1.repo_name,
 
                                    other_ref_type="branch",
 
                                    other_ref=rev2,
 
                                    repo=repo1.repo_name
 
                                    ))
 

	
 
        try:
0 comments (0 inline, 0 general)