Changeset - 75431548602a
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2013-02-04 02:18:44
marcin@python-works.com
fixed broken swap url, and added a test to detect it in feature
2 files changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/compare.py
Show inline comments
 
@@ -96,7 +96,7 @@ class CompareController(BaseRepoControll
 
        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_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)
rhodecode/tests/functional/test_compare.py
Show inline comments
 
@@ -109,7 +109,8 @@ class TestCompareController(TestControll
 
            response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
            ## files
 
            response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
            #swap
 
            response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&amp;other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name))
 
        finally:
 
            RepoModel().delete(r2_id)
 
            RepoModel().delete(r1_id)
 
@@ -166,7 +167,8 @@ class TestCompareController(TestControll
 
            response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
 
            ## files
 
            response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?other_repo=%s#C--826e8142e6ba">file1</a>""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
 

	
 
            #swap
 
            response.mustcontain("""<a href="/%s/compare/branch@%s...branch@%s?as_form=None&amp;other_repo=%s">[swap]</a>""" % (repo1.repo_name, rev1, rev2, repo2.repo_name))
 
        finally:
 
            RepoModel().delete(r2_id)
 
            RepoModel().delete(r1_id)
0 comments (0 inline, 0 general)