diff --git a/kallithea/templates/compare/compare_diff.html b/kallithea/templates/compare/compare_diff.html
--- a/kallithea/templates/compare/compare_diff.html
+++ b/kallithea/templates/compare/compare_diff.html
@@ -69,7 +69,7 @@ ${self.repo_context_bar('changelog')}
%endif
%for fid, change, f, stat in c.files:
-
${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}
+
${h.link_to(h.safe_unicode(f), '#' + fid)}
${h.fancy_file_stats(stat)}
%endfor
diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html
--- a/kallithea/templates/pullrequests/pullrequest_show.html
+++ b/kallithea/templates/pullrequests/pullrequest_show.html
@@ -250,7 +250,7 @@ ${self.repo_context_bar('showpullrequest
%endif
%for fid, change, f, stat in c.files:
-
${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}
+
${h.link_to(h.safe_unicode(f),'#' + fid)}
${h.fancy_file_stats(stat)}
%endfor
diff --git a/kallithea/tests/functional/test_compare.py b/kallithea/tests/functional/test_compare.py
--- a/kallithea/tests/functional/test_compare.py
+++ b/kallithea/tests/functional/test_compare.py
@@ -103,7 +103,7 @@ class TestCompareController(TestControll
response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
## files
- response.mustcontain("""file1""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
+ response.mustcontain("""file1""")
#swap
response.mustcontain(""" Swap""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
@@ -151,7 +151,7 @@ class TestCompareController(TestControll
response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
## files
- response.mustcontain("""file1""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
+ response.mustcontain("""file1""")
#swap
response.mustcontain(""" Swap""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
@@ -206,7 +206,7 @@ class TestCompareController(TestControll
response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
## files
- response.mustcontain("""file1""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
+ response.mustcontain("""file1""")
#swap
response.mustcontain(""" Swap""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
@@ -261,7 +261,7 @@ class TestCompareController(TestControll
response.mustcontain("""r1:%s""" % (repo2.repo_name, cs1.raw_id, cs1.short_id))
response.mustcontain("""r2:%s""" % (repo2.repo_name, cs2.raw_id, cs2.short_id))
## files
- response.mustcontain("""file1""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
+ response.mustcontain("""file1""")
#swap
response.mustcontain(""" Swap""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
@@ -419,9 +419,9 @@ class TestCompareController(TestControll
response.mustcontain("""r6:%s""" % (HG_FORK, rev2))
## files
- response.mustcontain("""vcs/backends/hg.py""" % (HG_REPO, rev1, rev2, HG_FORK))
- response.mustcontain("""vcs/backends/__init__.py""" % (HG_REPO, rev1, rev2, HG_FORK))
- response.mustcontain("""vcs/backends/base.py""" % (HG_REPO, rev1, rev2, HG_FORK))
+ response.mustcontain("""vcs/backends/hg.py""")
+ response.mustcontain("""vcs/backends/__init__.py""")
+ response.mustcontain("""vcs/backends/base.py""")
def test_compare_remote_branches_git(self):
self.log_user()
@@ -449,9 +449,9 @@ class TestCompareController(TestControll
response.mustcontain("""r6:%s""" % (GIT_FORK, rev2[:12]))
## files
- response.mustcontain("""vcs/backends/hg.py""" % (GIT_REPO, rev1, rev2, GIT_FORK))
- response.mustcontain("""vcs/backends/__init__.py""" % (GIT_REPO, rev1, rev2, GIT_FORK))
- response.mustcontain("""vcs/backends/base.py""" % (GIT_REPO, rev1, rev2, GIT_FORK))
+ response.mustcontain("""vcs/backends/hg.py""")
+ response.mustcontain("""vcs/backends/__init__.py""")
+ response.mustcontain("""vcs/backends/base.py""")
def test_org_repo_new_commits_after_forking_simple_diff_hg(self):
self.log_user()
diff --git a/kallithea/tests/functional/test_compare_local.py b/kallithea/tests/functional/test_compare_local.py
--- a/kallithea/tests/functional/test_compare_local.py
+++ b/kallithea/tests/functional/test_compare_local.py
@@ -29,17 +29,17 @@ class TestCompareController(TestControll
response.mustcontain('11 files changed with 94 insertions and 64 deletions')
## files diff
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
- response.mustcontain('''''' % (HG_REPO, tag1, tag2))
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
+ response.mustcontain('''''')
def test_compare_tag_git(self):
self.log_user()
@@ -67,17 +67,17 @@ class TestCompareController(TestControll
response.mustcontain('11 files changed with 94 insertions and 64 deletions')
#files
- response.mustcontain('''docs/api/utils/index.rst''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''test_and_report.sh''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''.hgignore''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''.hgtags''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''docs/api/index.rst''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/__init__.py''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/backends/hg.py''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/utils/__init__.py''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/utils/annotate.py''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/utils/diffs.py''' % (GIT_REPO, tag1, tag2))
- response.mustcontain('''vcs/utils/lazy.py''' % (GIT_REPO, tag1, tag2))
+ response.mustcontain('''docs/api/utils/index.rst''')
+ response.mustcontain('''test_and_report.sh''')
+ response.mustcontain('''.hgignore''')
+ response.mustcontain('''.hgtags''')
+ response.mustcontain('''docs/api/index.rst''')
+ response.mustcontain('''vcs/__init__.py''')
+ response.mustcontain('''vcs/backends/hg.py''')
+ response.mustcontain('''vcs/utils/__init__.py''')
+ response.mustcontain('''vcs/utils/annotate.py''')
+ response.mustcontain('''vcs/utils/diffs.py''')
+ response.mustcontain('''vcs/utils/lazy.py''')
def test_index_branch_hg(self):
self.log_user()
@@ -131,7 +131,7 @@ class TestCompareController(TestControll
response.mustcontain('1 file changed with 7 insertions and 0 deletions')
## files
- response.mustcontain(""".hgignore""" % (HG_REPO, rev1, rev2))
+ response.mustcontain(""".hgignore""")
def test_compare_revisions_git(self):
self.log_user()
@@ -153,4 +153,4 @@ class TestCompareController(TestControll
response.mustcontain('1 file changed with 7 insertions and 0 deletions')
## files
- response.mustcontain(""".hgignore""" % (GIT_REPO, rev1, rev2))
+ response.mustcontain(""".hgignore""")