diff --git a/rhodecode/tests/functional/test_compare.py b/rhodecode/tests/functional/test_compare.py
--- a/rhodecode/tests/functional/test_compare.py
+++ b/rhodecode/tests/functional/test_compare.py
@@ -106,6 +106,7 @@ class TestCompareController(TestControll
other_repo=repo2.repo_name,
other_ref_type="branch",
other_ref=rev1,
+ merge='1',
))
response.mustcontain('%s@%s -> %s@%s' % (repo1.repo_name, rev2, repo2.repo_name, rev1))
@@ -118,9 +119,9 @@ 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""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
#swap
- response.mustcontain("""[swap]""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
+ response.mustcontain("""[swap]""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
def test_compare_forks_on_branch_extra_commits_origin_has_incomming_hg(self):
self.log_user()
@@ -160,6 +161,7 @@ class TestCompareController(TestControll
other_repo=repo2.repo_name,
other_ref_type="branch",
other_ref=rev1,
+ merge='x',
))
response.mustcontain('%s@%s -> %s@%s' % (repo1.repo_name, rev2, repo2.repo_name, rev1))
response.mustcontain("""Showing 2 commits""")
@@ -171,9 +173,9 @@ 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""" % (repo1.repo_name, rev2, rev1, repo2.repo_name))
#swap
- response.mustcontain("""[swap]""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
+ response.mustcontain("""[swap]""" % (repo2.repo_name, rev1, rev2, repo1.repo_name))
def test_compare_cherry_pick_changesets_from_bottom(self):
@@ -215,20 +217,16 @@ class TestCompareController(TestControll
cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
message='commit6', vcs_type='hg', parent=cs4)
- rev1 = 'tip'
- rev2 = 'tip'
-
response = self.app.get(url(controller='compare', action='index',
repo_name=repo2.repo_name,
- org_ref_type="tag",
- org_ref=rev1,
+ org_ref_type="rev",
+ org_ref=cs1.short_id, # parent of cs2, in repo2
other_repo=repo1.repo_name,
- other_ref_type="tag",
- other_ref=rev2,
- rev_start=cs2.raw_id,
- rev_end=cs4.raw_id,
+ other_ref_type="rev",
+ other_ref=cs4.short_id,
+ merge='True',
))
- response.mustcontain('%s@%s -> %s@%s' % (repo2.repo_name, cs2.short_id, repo1.repo_name, cs4.short_id))
+ response.mustcontain('%s@%s -> %s@%s' % (repo2.repo_name, cs1.short_id, repo1.repo_name, cs4.short_id))
response.mustcontain("""Showing 3 commits""")
response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
@@ -280,21 +278,16 @@ class TestCompareController(TestControll
message='commit5', vcs_type='hg', parent=cs3)
cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
message='commit6', vcs_type='hg', parent=cs4)
- rev1 = 'tip'
- rev2 = 'tip'
-
response = self.app.get(url(controller='compare', action='index',
- repo_name=repo2.repo_name,
- org_ref_type="tag",
- org_ref=rev1,
- other_repo=repo1.repo_name,
- other_ref_type="tag",
- other_ref=rev2,
- rev_start=cs3.raw_id,
- rev_end=cs5.raw_id,
+ repo_name=repo1.repo_name,
+ org_ref_type="rev",
+ org_ref=cs2.short_id, # parent of cs3, not in repo2
+ other_ref_type="rev",
+ other_ref=cs5.short_id,
+ merge='1',
))
- response.mustcontain('%s@%s -> %s@%s' % (repo2.repo_name, cs3.short_id, repo1.repo_name, cs5.short_id))
+ response.mustcontain('%s@%s -> %s@%s' % (repo1.repo_name, cs2.short_id, repo1.repo_name, cs5.short_id))
response.mustcontain("""Showing 3 commits""")
response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
@@ -330,6 +323,7 @@ class TestCompareController(TestControll
other_ref_type="rev",
other_ref=rev2,
other_repo=HG_FORK,
+ merge='1',
))
response.mustcontain('%s@%s -> %s@%s' % (HG_REPO, rev1, HG_FORK, rev2))
## outgoing changesets between those revisions
@@ -339,9 +333,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""" % (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))
def test_org_repo_new_commits_after_forking_simple_diff(self):
self.log_user()
@@ -412,6 +406,7 @@ class TestCompareController(TestControll
other_ref_type="branch",
other_ref=rev2,
other_repo=r1_name,
+ merge='1',
))
response.mustcontain('%s@%s -> %s@%s' % (r2_name, rev1, r1_name, rev2))
response.mustcontain('No files')
@@ -436,6 +431,7 @@ class TestCompareController(TestControll
other_ref_type="branch",
other_ref=rev2,
other_repo=r1_name,
+ merge='1',
))
response.mustcontain('%s@%s -> %s@%s' % (r2_name, rev1, r1_name, rev2))