comparison rhodecode/tests/functional/test_compare.py @ 3484:75e563531350 beta

compare: drop unused rev_start and rev_end
author Mads Kiilerich <madski@unity3d.com>
date Mon, 04 Mar 2013 17:38:34 +0100
parents b3680a200f75
children 2053053e0882
comparison
equal deleted inserted replaced
3482:8ee36513efae 3484:75e563531350
213 cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n', 213 cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n',
214 message='commit5', vcs_type='hg', parent=cs3) 214 message='commit5', vcs_type='hg', parent=cs3)
215 cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n', 215 cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
216 message='commit6', vcs_type='hg', parent=cs4) 216 message='commit6', vcs_type='hg', parent=cs4)
217 217
218 rev1 = 'tip'
219 rev2 = 'tip'
220
221 response = self.app.get(url(controller='compare', action='index', 218 response = self.app.get(url(controller='compare', action='index',
222 repo_name=repo2.repo_name, 219 repo_name=repo2.repo_name,
223 org_ref_type="tag", 220 org_ref_type="rev",
224 org_ref=rev1, 221 org_ref=cs1.short_id, # parent of cs2, in repo2
225 other_repo=repo1.repo_name, 222 other_repo=repo1.repo_name,
226 other_ref_type="tag", 223 other_ref_type="rev",
227 other_ref=rev2, 224 other_ref=cs4.short_id,
228 rev_start=cs2.raw_id, 225 ))
229 rev_end=cs4.raw_id, 226 response.mustcontain('%s@%s -&gt; %s@%s' % (repo2.repo_name, cs1.short_id, repo1.repo_name, cs4.short_id))
230 ))
231 response.mustcontain('%s@%s -&gt; %s@%s' % (repo2.repo_name, cs2.short_id, repo1.repo_name, cs4.short_id))
232 response.mustcontain("""Showing 3 commits""") 227 response.mustcontain("""Showing 3 commits""")
233 response.mustcontain("""1 file changed with 3 insertions and 0 deletions""") 228 response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
234 229
235 response.mustcontain("""<div class="message tooltip" title="commit3" style="white-space:normal">commit3</div>""") 230 response.mustcontain("""<div class="message tooltip" title="commit3" style="white-space:normal">commit3</div>""")
236 response.mustcontain("""<div class="message tooltip" title="commit4" style="white-space:normal">commit4</div>""") 231 response.mustcontain("""<div class="message tooltip" title="commit4" style="white-space:normal">commit4</div>""")
278 message='commit4', vcs_type='hg', parent=cs2) 273 message='commit4', vcs_type='hg', parent=cs2)
279 cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n', 274 cs4 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\n',
280 message='commit5', vcs_type='hg', parent=cs3) 275 message='commit5', vcs_type='hg', parent=cs3)
281 cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n', 276 cs5 = _commit_change(repo1.repo_name, filename='file1', content='line1\nline2\nline3\nline4\nline5\nline6\n',
282 message='commit6', vcs_type='hg', parent=cs4) 277 message='commit6', vcs_type='hg', parent=cs4)
283 rev1 = 'tip' 278 response = self.app.get(url(controller='compare', action='index',
284 rev2 = 'tip' 279 repo_name=repo1.repo_name,
285 280 org_ref_type="rev",
286 response = self.app.get(url(controller='compare', action='index', 281 org_ref=cs2.short_id, # parent of cs3, not in repo2
287 repo_name=repo2.repo_name, 282 other_ref_type="rev",
288 org_ref_type="tag", 283 other_ref=cs5.short_id,
289 org_ref=rev1, 284 ))
290 other_repo=repo1.repo_name, 285
291 other_ref_type="tag", 286 response.mustcontain('%s@%s -&gt; %s@%s' % (repo1.repo_name, cs2.short_id, repo1.repo_name, cs5.short_id))
292 other_ref=rev2,
293 rev_start=cs3.raw_id,
294 rev_end=cs5.raw_id,
295 ))
296
297 response.mustcontain('%s@%s -&gt; %s@%s' % (repo2.repo_name, cs3.short_id, repo1.repo_name, cs5.short_id))
298 response.mustcontain("""Showing 3 commits""") 287 response.mustcontain("""Showing 3 commits""")
299 response.mustcontain("""1 file changed with 3 insertions and 0 deletions""") 288 response.mustcontain("""1 file changed with 3 insertions and 0 deletions""")
300 289
301 response.mustcontain("""<div class="message tooltip" title="commit4" style="white-space:normal">commit4</div>""") 290 response.mustcontain("""<div class="message tooltip" title="commit4" style="white-space:normal">commit4</div>""")
302 response.mustcontain("""<div class="message tooltip" title="commit5" style="white-space:normal">commit5</div>""") 291 response.mustcontain("""<div class="message tooltip" title="commit5" style="white-space:normal">commit5</div>""")