The operation you ought to perform for the course are:
To perform the task shown here you need to have the Subversive SVN Team Provider plugin.
This operation has to be performed only once on the computer the first time SVN is used. It has already been performed in the LAIB PCs.
You can follow the instructions for the SVN plugin.
From the File menu select Import, the wizard window appears:
Select SVN and then Project from SVN, and, if you are following the procedure for the first time, in the wizard check the Create a New Repository Location and then Next>.
If you already created a repo location you can select an existing repository and skip the next step.
The dialog requiring the information about the repository appears, insert the URL of the repository and provide a label.
http://oop.polito.it/svn/OOP2021/ENG/
for the code samples presented during lectureshttp://oop.polito.it/svn/OOPLabs/s000000
for the personal Lab Assignment repository; in this case:
s000000
you should provide your own id,Click Finish and the resource selection dialog appears.
In case of errore (related to Connector) you probably did not installa the connector: please make sure you followed ALL the steps in the Subversive plug-in installation!
DO NOT CLICK FINISH!!!: that would check out the entire repository which includes several projects, while Eclipse is expecting a single project.
Click on the Browse button, the Select Resource dialog appears:
The folders shown there are the Eclipse projects you need to import: select one of them and click on OK. You are taken back to the previous dialog.
Now, with the project resource selected, you can click on Finish; the Check Out As dialog appears:
Typically the default settings are ok: you want to check-out the latest version (the Head Revision)2, into a folder with the same name as the project3 within the Eclipse workspace
Click on Finish to check-out the project into your workspace.
To commit your work to the repository (i.e. save a copy of the current status of your project):
Right click on your project, then select Team and then Commit…;
The Commit dialog opens:
The window reports the resources (files) that changed w.r.t. the reversion you checked out from the repository. They could have been: modified, added, or removed.
Provide a comment (e.g. Implemented requirement R1) and click OK.
The project is committed to the repository.
If the project has been changed by someone else (e.g. the project with the lectures’ examples had been changed by the professor), it is required to update your local copy to the latest version present on the repository (HEAD).
To execute the update of your local copy:
Right click on your project, then select Team and then Update to HEAD;
Be careful that if you made some changed to the files w.r.t. the version that you previously got from the repo, some conflicts might be found. Handling conflicts is beyond the scope of this document, please refer to the lecture on Configuration Management.