

def test_update_repo_url(self):
    remote_path2 = ('%s/remote2/' % (self.root,))
    check_call(['mkdir', '-p', remote_path2])
    check_call(['git', 'clone', vcs.remote_path, remote_path2], cwd=self.root)
    self._set_author('Remote2 Committer', 'Remote2Committer@example.com', path=remote_path2)
    self._add_file('BAZ', remote_path2, commit_msg='bazzy')
    vcs = self.get_vcs()
    vcs.clone()
    vcs.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 2)
    vcs.url = remote_path2
    vcs.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 3)
    vcs.url = self.remote_path
    vcs.update()
    revisions = list(vcs.log())
    assert (len(revisions) == 2)

dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py GitVcsTest.test_update_repo_url/VarMisuse@41/66 `self`->`vcs`