Книга: Embedded Linux development using Eclipse

8.2.4 Team Synchronizing

8.2.4 Team Synchronizing

Having committed the project to CVS, we can continue working on our own copy in the workspace and later synchronize any changes with what’s in the repository. Make some minor change to thermostat.c, add a comment, perhaps. When you save the changes, greater-than signs (>) appear next to the project name and the file, indicating changes that will need to be checked in to the repository.

Right-click thermostat.c in the Project Explorer view and select Team?Synchronize with Repository. This brings up the C Compare Viewer, showing the differences between the Local File on the left and the Remote File in the repository on the right (Figure 8.25). Icons in the tool bar let you step through the differences. You can also copy any non-conflicting changes from the Remote File to the Local File, that is, from right to left.


Figure 8.25: C Compare Viewer.

Where a team of developers is involved, it’s quite likely that the file in the repository, the Remote File, contains changes from someone else. The C Compare Viewer highlights those changes as well. In practice, you should perform a Team?Update operation on the file before synchronizing with the repository. 

Now you can commit the new version back to the repository. Right-click thermostat.c and select Team?Commit…. This operation is also known as “checking in.” You’re prompted to enter a comment for the commit operation. Then click Finish. The new version is written back to the repository.

For completeness, we’ll also go through the process of checking a project out of the repository. In the C/C++ perspective, delete the thermostat project. When prompted, check Delete project contents on disk. Now go back to the CVS Repository Exploring perspective and right-click on thermostat. Select Check Out. The project is copied to your workspace and built.

Оглавление книги


Генерация: 5.099. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз