def test_update_repo_url(self):
        # Create a second remote
        remote_path2 = '%s/remote2/' % (self.root,)
        check_call(['mkdir', '-p', remote_path2])
        check_call(['git', 'clone', self.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')

        # Clone original remote
        vcs = self.get_vcs()
        vcs.clone()
        vcs.update()
        revisions = list(vcs.log())
        assert len(revisions) == 2

        # Update to new remote
        vcs.url = remote_path2
        vcs.update()
        revisions = list(vcs.log())
        assert len(revisions) == 3

        # Revert to original
        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/original