

def test_first_parent(self):
    vcs = self.get_vcs()
    self._add_file('BAZ', self.remote_path, commit_msg='baz')
    self._add_file('BAZ2', self.remote_path, commit_msg='baz2')
    check_call(['git', 'checkout', 'HEAD^'], cwd=self.remote_path)
    self._add_file('SECOND_PARENT', self.remote_path, commit_msg='second parent')
    to_merge = check_output(['git', 'rev-parse', 'HEAD'], cwd=self.remote_path)
    check_call('git checkout master'.split(' '), cwd=self.remote_path)
    check_call(['git', 'merge', to_merge.strip('\n')], cwd=self.remote_path)
    self.clone()
    vcs.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 5)
    revisions = list(vcs.log(first_parent=False))
    assert (len(revisions) == 6)

dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py GitVcsTest.test_first_parent/VarMisuse@137/216 `vcs`->`self`