##// END OF EJS Templates
fixed broken swap url, and added a test to detect it in feature
marcink -
r3320:75431548 beta
parent child Browse files
Show More
@@ -96,7 +96,7 b' class CompareController(BaseRepoControll'
96 96 c.swap_url = h.url('compare_url', as_form=request.GET.get('as_form'),
97 97 repo_name=other_repo,
98 98 org_ref_type=other_ref[0], org_ref=other_ref[1],
99 repo=org_repo,
99 other_repo=org_repo,
100 100 other_ref_type=org_ref[0], other_ref=org_ref[1])
101 101
102 102 c.org_repo = org_repo = Repository.get_by_repo_name(org_repo)
@@ -109,7 +109,8 b' class TestCompareController(TestControll'
109 109 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
110 110 ## files
111 111 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))
112
112 #swap
113 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))
113 114 finally:
114 115 RepoModel().delete(r2_id)
115 116 RepoModel().delete(r1_id)
@@ -166,7 +167,8 b' class TestCompareController(TestControll'
166 167 response.mustcontain("""<a href="/%s/changeset/%s">r2:%s</a>""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
167 168 ## files
168 169 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))
169
170 #swap
171 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))
170 172 finally:
171 173 RepoModel().delete(r2_id)
172 174 RepoModel().delete(r1_id)
General Comments 0
You need to be logged in to leave comments. Login now