def test_B_RawDiffNewCommits(self):
        base, branch_name, branch = self._setup_for_tracked_branch()

        self.assertIs(branch.has_new_commits(), False)

        # push a new commit on branch as dev
        phlgit_checkout.branch(self.repo_dev, branch_name)
        filename = 'new_on_branch'
        self._create_new_file(self.repo_dev, filename)
        self.repo_dev('add', filename)
        phlgit_commit.index(self.repo_dev, message=filename)
        phlgit_push.branch(self.repo_dev, branch_name)

        branch = self._get_updated_branch(branch_name)

        # check for new stuff as arcyd
        self.assertIs(branch.has_new_commits(), True)
        branch.describe_new_commits()  # just exercise
        self.assertIn(filename, branch.make_raw_diff().diff)
        branch.mark_ok_in_review()
        self.assertIs(branch.has_new_commits(), False)
        branch.describe_new_commits()  # just exercise

        # exercise queries a bit
        self.assertIn(filename, branch.make_raw_diff().diff)
        self.assertIn(filename, branch.make_message_digest())
        self.assertEqual(
            branch.get_commit_message_from_tip().strip(),
            filename)
        self.assertTrue(len(branch.get_any_author_emails()) > 0)
        self.assertTrue(len(branch.get_author_names_emails()) > 0)

        # make a new commit on master as dev
        phlgit_checkout.branch(self.repo_dev, 'master')
        filename = 'new_on_master'
        self._create_new_file(self.repo_dev, filename)
        self.repo_dev('add', filename)
        phlgit_commit.index(self.repo_dev, message=filename)
        phlgit_push.branch(self.repo_dev, 'master')

        # refresh the branch
        branch = self._get_updated_branch(branch_name)
        self.assertIs(branch.has_new_commits(), False)

        # merge master into branch, check for new stuff as arcyd
        phlgit_checkout.branch(self.repo_dev, branch_name)
        phlgit_merge.no_ff(self.repo_dev, 'master')
        phlgit_push.branch(self.repo_dev, branch_name)

        # check for new stuff as arcyd
        self.assertIs(branch.has_new_commits(), False)
        branch = self._get_updated_branch(branch_name)
        self.assertNotIn(filename, branch.make_raw_diff().diff)
        branch.mark_ok_in_review()
        self.assertIs(branch.has_new_commits(), False)

        # rebase branch onto master
        phlgit_checkout.branch(self.repo_dev, branch_name)
        phlgit_rebase.onto_upstream(self.repo_dev, 'master')
        phlgit_push.force_branch(self.repo_dev, branch_name)

        # check for new stuff as arcyd
        self.assertIs(branch.has_new_commits(), False)
        branch = self._get_updated_branch(branch_name)
        self.assertIs(branch.has_new_commits(), True)
        branch.describe_new_commits()  # just exercise
        branch.mark_ok_in_review()
        self.assertIs(branch.has_new_commits(), False)
dataset/ETHPy150Open bloomberg/phabricator-tools/py/abd/abdt_git__t.py/Test.test_B_RawDiffNewCommits/original