Show More
@@ -599,7 +599,7 b' TODO: To be written...' | |||||
599 | 'test user', 'test@rhodecode.com', 'merge message 1', |
|
599 | 'test user', 'test@rhodecode.com', 'merge message 1', | |
600 | dry_run=False) |
|
600 | dry_run=False) | |
601 | expected_merge_response = MergeResponse( |
|
601 | expected_merge_response = MergeResponse( | |
602 |
True, True, merge_response.merge_ |
|
602 | True, True, merge_response.merge_ref, | |
603 | MergeFailureReason.NONE) |
|
603 | MergeFailureReason.NONE) | |
604 | assert merge_response == expected_merge_response |
|
604 | assert merge_response == expected_merge_response | |
605 |
|
605 | |||
@@ -611,14 +611,14 b' TODO: To be written...' | |||||
611 | assert target_ref.commit_id in commit_ids |
|
611 | assert target_ref.commit_id in commit_ids | |
612 |
|
612 | |||
613 | merge_commit = target_commits[-1] |
|
613 | merge_commit = target_commits[-1] | |
614 | assert merge_commit.raw_id == merge_response.merge_commit_id |
|
614 | assert merge_commit.raw_id == merge_response.merge_ref.commit_id | |
615 | assert merge_commit.message.strip() == 'merge message 1' |
|
615 | assert merge_commit.message.strip() == 'merge message 1' | |
616 | assert merge_commit.author == 'test user <test@rhodecode.com>' |
|
616 | assert merge_commit.author == 'test user <test@rhodecode.com>' | |
617 |
|
617 | |||
618 | # Check the bookmark was updated in the target repo |
|
618 | # Check the bookmark was updated in the target repo | |
619 | assert ( |
|
619 | assert ( | |
620 | target_repo.bookmarks[bookmark_name] == |
|
620 | target_repo.bookmarks[bookmark_name] == | |
621 | merge_response.merge_commit_id) |
|
621 | merge_response.merge_ref.commit_id) | |
622 |
|
622 | |||
623 | def test_merge_source_is_bookmark(self, vcsbackend_hg): |
|
623 | def test_merge_source_is_bookmark(self, vcsbackend_hg): | |
624 | target_repo = vcsbackend_hg.create_repo(number_of_commits=1) |
|
624 | target_repo = vcsbackend_hg.create_repo(number_of_commits=1) | |
@@ -643,7 +643,7 b' TODO: To be written...' | |||||
643 | 'test user', 'test@rhodecode.com', 'merge message 1', |
|
643 | 'test user', 'test@rhodecode.com', 'merge message 1', | |
644 | dry_run=False) |
|
644 | dry_run=False) | |
645 | expected_merge_response = MergeResponse( |
|
645 | expected_merge_response = MergeResponse( | |
646 |
True, True, merge_response.merge_ |
|
646 | True, True, merge_response.merge_ref, | |
647 | MergeFailureReason.NONE) |
|
647 | MergeFailureReason.NONE) | |
648 | assert merge_response == expected_merge_response |
|
648 | assert merge_response == expected_merge_response | |
649 |
|
649 | |||
@@ -717,7 +717,7 b' TODO: To be written...' | |||||
717 | dry_run=False, use_rebase=True) |
|
717 | dry_run=False, use_rebase=True) | |
718 |
|
718 | |||
719 | expected_merge_response = MergeResponse( |
|
719 | expected_merge_response = MergeResponse( | |
720 |
True, True, merge_response.merge_ |
|
720 | True, True, merge_response.merge_ref, | |
721 | MergeFailureReason.NONE) |
|
721 | MergeFailureReason.NONE) | |
722 | assert merge_response == expected_merge_response |
|
722 | assert merge_response == expected_merge_response | |
723 |
|
723 |
@@ -308,7 +308,7 b' class TestRepositoryMerge:' | |||||
308 | 'test user', 'test@rhodecode.com', 'merge message 1', |
|
308 | 'test user', 'test@rhodecode.com', 'merge message 1', | |
309 | dry_run=False) |
|
309 | dry_run=False) | |
310 | expected_merge_response = MergeResponse( |
|
310 | expected_merge_response = MergeResponse( | |
311 |
True, True, merge_response.merge_ |
|
311 | True, True, merge_response.merge_ref, | |
312 | MergeFailureReason.NONE) |
|
312 | MergeFailureReason.NONE) | |
313 | assert merge_response == expected_merge_response |
|
313 | assert merge_response == expected_merge_response | |
314 |
|
314 | |||
@@ -320,27 +320,28 b' class TestRepositoryMerge:' | |||||
320 | assert self.target_ref.commit_id in commit_ids |
|
320 | assert self.target_ref.commit_id in commit_ids | |
321 |
|
321 | |||
322 | merge_commit = target_commits[-1] |
|
322 | merge_commit = target_commits[-1] | |
323 |
assert merge_commit.raw_id == merge_response.merge_ |
|
323 | assert merge_commit.raw_id == merge_response.merge_ref | |
324 | assert merge_commit.message.strip() == 'merge message 1' |
|
324 | assert merge_commit.message.strip() == 'merge message 1' | |
325 | assert merge_commit.author == 'test user <test@rhodecode.com>' |
|
325 | assert merge_commit.author == 'test user <test@rhodecode.com>' | |
326 |
|
326 | |||
327 | # We call it twice so to make sure we can handle updates |
|
327 | # We call it twice so to make sure we can handle updates | |
328 | target_ref = Reference( |
|
328 | target_ref = Reference( | |
329 | self.target_ref.type, self.target_ref.name, |
|
329 | self.target_ref.type, self.target_ref.name, | |
330 | merge_response.merge_commit_id) |
|
330 | merge_response.merge_ref.commit_id) | |
331 |
|
331 | |||
332 | merge_response = target_repo.merge( |
|
332 | merge_response = target_repo.merge( | |
333 | target_ref, self.source_repo, self.source_ref, self.workspace, |
|
333 | target_ref, self.source_repo, self.source_ref, self.workspace, | |
334 | 'test user', 'test@rhodecode.com', 'merge message 2', |
|
334 | 'test user', 'test@rhodecode.com', 'merge message 2', | |
335 | dry_run=False) |
|
335 | dry_run=False) | |
336 | expected_merge_response = MergeResponse( |
|
336 | expected_merge_response = MergeResponse( | |
337 |
True, True, merge_response.merge_ |
|
337 | True, True, merge_response.merge_ref, | |
338 | MergeFailureReason.NONE) |
|
338 | MergeFailureReason.NONE) | |
339 | assert merge_response == expected_merge_response |
|
339 | assert merge_response == expected_merge_response | |
340 |
|
340 | |||
341 | target_repo = backends.get_backend( |
|
341 | target_repo = backends.get_backend( | |
342 | vcsbackend.alias)(self.target_repo.path) |
|
342 | vcsbackend.alias)(self.target_repo.path) | |
343 |
merge_commit = target_repo.get_commit( |
|
343 | merge_commit = target_repo.get_commit( | |
|
344 | merge_response.merge_ref.commit_id) | |||
344 | assert merge_commit.message.strip() == 'merge message 1' |
|
345 | assert merge_commit.message.strip() == 'merge message 1' | |
345 | assert merge_commit.author == 'test user <test@rhodecode.com>' |
|
346 | assert merge_commit.author == 'test user <test@rhodecode.com>' | |
346 |
|
347 |
General Comments 0
You need to be logged in to leave comments.
Login now