annotate rhodecode/tests/functional/test_compare_local.py @ 4116:ffd45b185016 rhodecode-2.2.5-gpl

Imported some of the GPLv3'd changes from RhodeCode v2.2.5. This imports changes between changesets 21af6c4eab3d and 6177597791c2 in RhodeCode's original repository, including only changes to Python files and HTML. RhodeCode clearly licensed its changes to these files under GPLv3 in their /LICENSE file, which states the following: The Python code and integrated HTML are licensed under the GPLv3 license. (See: https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE or http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE for an online copy of that LICENSE file) Conservancy reviewed these changes and confirmed that they can be licensed as a whole to the Kallithea project under GPLv3-only. While some of the contents committed herein are clearly licensed GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the statement above from RhodeCode indicates that they intend GPLv3-only as their license, per GPLv3ยง14 and other relevant sections of GPLv3.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:03:13 -0400
parents d7488551578e
children 7e5f8c12a3fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
1 # -*- coding: utf-8 -*-
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 from rhodecode.tests import *
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 class TestCompareController(TestController):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 def test_compare_tag_hg(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 self.log_user()
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 3304
diff changeset
8 tag1 = 'v0.1.2'
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 3304
diff changeset
9 tag2 = 'v0.1.3'
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
10 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 repo_name=HG_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 org_ref_type="tag",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 org_ref=tag1,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 other_ref_type="tag",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 other_ref=tag2,
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 3304
diff changeset
16 ), status=200)
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
17 response.mustcontain('%s@%s' % (HG_REPO, tag1))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
18 response.mustcontain('%s@%s' % (HG_REPO, tag2))
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 3304
diff changeset
19
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 ## outgoing changesets between tags
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 response.mustcontain('''<a href="/%s/changeset/c5ddebc06eaaba3010c2d66ea6ec9d074eb0f678">r112:c5ddebc06eaa</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 response.mustcontain('''<a href="/%s/changeset/70d4cef8a37657ee4cf5aabb3bd9f68879769816">r115:70d4cef8a376</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 response.mustcontain('''<a href="/%s/changeset/9749bfbfc0d2eba208d7947de266303b67c87cda">r116:9749bfbfc0d2</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 response.mustcontain('''<a href="/%s/changeset/41fda979f02fda216374bf8edac4e83f69e7581c">r117:41fda979f02f</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 response.mustcontain('''<a href="/%s/changeset/bb1a3ab98cc45cb934a77dcabf87a5a598b59e97">r118:bb1a3ab98cc4</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 response.mustcontain('''<a href="/%s/changeset/36e0fc9d2808c5022a24f49d6658330383ed8666">r119:36e0fc9d2808</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 response.mustcontain('''<a href="/%s/changeset/17544fbfcd33ffb439e2b728b5d526b1ef30bfcf">r120:17544fbfcd33</a>''' % HG_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 response.mustcontain('11 files changed with 94 insertions and 64 deletions')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 ## files diff
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--1c5cf9e91c12">docs/api/utils/index.rst</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--e3305437df55">test_and_report.sh</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--c8e92ef85cd1">.hgignore</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--6e08b694d687">.hgtags</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--2c14b00f3393">docs/api/index.rst</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--430ccbc82bdf">vcs/__init__.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
38 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--9c390eb52cd6">vcs/backends/hg.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--ebb592c595c0">vcs/utils/__init__.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--7abc741b5052">vcs/utils/annotate.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--2ef0ef106c56">vcs/utils/diffs.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
42 response.mustcontain('''<div class="node"><a href="/%s/compare/tag@%s...tag@%s#C--3150cb87d4b7">vcs/utils/lazy.py</a></div>''' % (HG_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
43
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
44 def test_compare_tag_git(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
45 self.log_user()
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
46 tag1 = 'v0.1.2'
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
47 tag2 = 'v0.1.3'
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
48 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
49 repo_name=GIT_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
50 org_ref_type="tag",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
51 org_ref=tag1,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
52 other_ref_type="tag",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
53 other_ref=tag2,
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 3304
diff changeset
54 ), status=200)
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
55 response.mustcontain('%s@%s' % (GIT_REPO, tag1))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
56 response.mustcontain('%s@%s' % (GIT_REPO, tag2))
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
57
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
58 ## outgoing changesets between tags
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
59 response.mustcontain('''<a href="/%s/changeset/794bbdd31545c199f74912709ea350dedcd189a2">r113:794bbdd31545</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 response.mustcontain('''<a href="/%s/changeset/e36d8c5025329bdd4212bd53d4ed8a70ff44985f">r115:e36d8c502532</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
61 response.mustcontain('''<a href="/%s/changeset/5c9ff4f6d7508db0e72b1d2991c357d0d8e07af2">r116:5c9ff4f6d750</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
62 response.mustcontain('''<a href="/%s/changeset/b7187fa2b8c1d773ec35e9dee12f01f74808c879">r117:b7187fa2b8c1</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
63 response.mustcontain('''<a href="/%s/changeset/5f3b74262014a8de2dc7dade1152de9fd0c8efef">r118:5f3b74262014</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
64 response.mustcontain('''<a href="/%s/changeset/17438a11f72b93f56d0e08e7d1fa79a378578a82">r119:17438a11f72b</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
65 response.mustcontain('''<a href="/%s/changeset/5a3a8fb005554692b16e21dee62bf02667d8dc3e">r120:5a3a8fb00555</a>''' % GIT_REPO)
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
66
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
67 response.mustcontain('11 files changed with 94 insertions and 64 deletions')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
68
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
69 #files
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
70 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--1c5cf9e91c12">docs/api/utils/index.rst</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
71 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--e3305437df55">test_and_report.sh</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
72 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--c8e92ef85cd1">.hgignore</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
73 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--6e08b694d687">.hgtags</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
74 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--2c14b00f3393">docs/api/index.rst</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
75 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--430ccbc82bdf">vcs/__init__.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
76 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--9c390eb52cd6">vcs/backends/hg.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
77 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--ebb592c595c0">vcs/utils/__init__.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
78 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--7abc741b5052">vcs/utils/annotate.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
79 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--2ef0ef106c56">vcs/utils/diffs.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
80 response.mustcontain('''<a href="/%s/compare/tag@%s...tag@%s#C--3150cb87d4b7">vcs/utils/lazy.py</a>''' % (GIT_REPO, tag1, tag2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
81
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
82 def test_index_branch_hg(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
83 self.log_user()
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
84 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
85 repo_name=HG_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
86 org_ref_type="branch",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
87 org_ref='default',
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
88 other_ref_type="branch",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
89 other_ref='default',
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
90 ))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
91
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
92 response.mustcontain('%s@default' % (HG_REPO))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
93 response.mustcontain('%s@default' % (HG_REPO))
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
94 # branch are equal
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
95 response.mustcontain('<span class="empty_data">No files</span>')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
96 response.mustcontain('<span class="empty_data">No changesets</span>')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
97
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
98 def test_index_branch_git(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
99 self.log_user()
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
100 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
101 repo_name=GIT_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
102 org_ref_type="branch",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
103 org_ref='master',
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
104 other_ref_type="branch",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
105 other_ref='master',
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
106 ))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
107
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
108 response.mustcontain('%s@master' % (GIT_REPO))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
109 response.mustcontain('%s@master' % (GIT_REPO))
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
110 # branch are equal
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
111 response.mustcontain('<span class="empty_data">No files</span>')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
112 response.mustcontain('<span class="empty_data">No changesets</span>')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
113
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
114 def test_compare_revisions_hg(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
115 self.log_user()
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
116 rev1 = 'b986218ba1c9'
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
117 rev2 = '3d8f361e72ab'
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
118
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
119 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
120 repo_name=HG_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
121 org_ref_type="rev",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
122 org_ref=rev1,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
123 other_ref_type="rev",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
124 other_ref=rev2,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
125 ))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
126 response.mustcontain('%s@%s' % (HG_REPO, rev1))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
127 response.mustcontain('%s@%s' % (HG_REPO, rev2))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
128
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
129 ## outgoing changesets between those revisions
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
130 response.mustcontain("""<a href="/%s/changeset/3d8f361e72ab303da48d799ff1ac40d5ac37c67e">r1:%s</a>""" % (HG_REPO, rev2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
131
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
132 response.mustcontain('1 file changed with 7 insertions and 0 deletions')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
133 ## files
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
134 response.mustcontain("""<a href="/%s/compare/rev@%s...rev@%s#C--c8e92ef85cd1">.hgignore</a>""" % (HG_REPO, rev1, rev2))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
135
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
136 def test_compare_revisions_git(self):
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
137 self.log_user()
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
138 rev1 = 'c1214f7e79e02fc37156ff215cd71275450cffc3'
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
139 rev2 = '38b5fe81f109cb111f549bfe9bb6b267e10bc557'
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
140
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
141 response = self.app.get(url('compare_url',
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
142 repo_name=GIT_REPO,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
143 org_ref_type="rev",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
144 org_ref=rev1,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
145 other_ref_type="rev",
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
146 other_ref=rev2,
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
147 ))
4116
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
148 response.mustcontain('%s@%s' % (GIT_REPO, rev1))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
149 response.mustcontain('%s@%s' % (GIT_REPO, rev2))
ffd45b185016 Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
150
3023
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
151 ## outgoing changesets between those revisions
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
152 response.mustcontain("""<a href="/%s/changeset/38b5fe81f109cb111f549bfe9bb6b267e10bc557">r1:%s</a>""" % (GIT_REPO, rev2[:12]))
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
153 response.mustcontain('1 file changed with 7 insertions and 0 deletions')
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
154
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
155 ## files
c2a206162062 Basic implementation of cherry picking changesets
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
156 response.mustcontain("""<a href="/%s/compare/rev@%s...rev@%s#C--c8e92ef85cd1">.hgignore</a>""" % (GIT_REPO, rev1, rev2))