

def test_log_with_paths_and_branches(self):
    vcs = self.get_vcs()
    check_call('git checkout -b B2'.split(' '), cwd=self.remote_path)
    self._add_file('BAZ', self.remote_path, commit_msg='second branch commit')
    check_call(['git', 'checkout', vcs.get_default_revision()], cwd=self.remote_path)
    check_call('git checkout -b B3'.split(' '), cwd=self.remote_path)
    self._add_file('IPSUM', self.remote_path, commit_msg='3rd branch')
    vcs.clone()
    self.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 4)
    revisions = list(vcs.log(branch='B2', paths=['FOO', 'BAZ', 'IPSUM']))
    assert (len(revisions) == 2)
    check_call(['git', 'checkout', vcs.get_default_revision()], cwd=self.remote_path)
    revisions = list(vcs.log(branch=vcs.get_default_revision()))
    assert (len(revisions) == 2)

dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py GitVcsTest.test_log_with_paths_and_branches/VarMisuse@107/175 `vcs`->`self`