Checkout: Retrieving the Sources
Now that you successfully defined your repository location, it is time to grab the information from the repository to create your working folders. Modules are the name for the main folders inside a CVS server. Cervisia fetches the list of modules for you. Sometimes, more than one module is necessary to perform one task, therefore you will have to checkout multiple times. If you are not sure which modules you need, search for this information first (in your projects web pages).
You should also know the name of the branch you want. Cervisia and the cvs command checkout the main (latest) branch, also known as HEAD, by default. The branch your working folder is based on is called BASE (BASE may be equal to HEAD). Branches are created to allow a module to evolve in different directions. A good real life example of the utility of this feature is the release of a software project. After a major release, there are bugs in the code that should be fixed. At the same time, people want to add new features to the application, creating new bugs. To solve this, CVS lets you fork the development by creating a stable release branch, so people can decide what goes where: bugfixes to both, new features to HEAD resulting in stability to the released branch.
To checkout a module,
- Click the "Repository" menu then the "Checkout..." menu item.
- The "CVS Checkout" dialog box will pop up. Now select the desired location from the "Repository Drop Down Box".
- Press the "Fetch List" button to obtain the modules list or type the module_name on the "Module Combo Box". If you want to get a specific folder of the module, enter the folder path too. For instance, you can checkout the "myproject" module you created if you are using the local repository example, or you can checkout the "arts" module, the first required to build KDE if you are using the KDE Anonymous CVS location.
- Type the name of the desired branch in the "Branch Tag Edit Box". If the box is empty, Cervisia will checkout the HEAD (main) branch. For example, the current arts stable branch is "ARTS_1_2_STABLE".
- Type the path to the folder where you want to locate the module's working folder in the "Working Folder Edit Box", or press the "..." button to select it the file dialog.
- Press OK.
Now that you successfully checked out the module, the repository location is stored in your working folder, simplifying further operations between the working folder and the repository. You won't need to choose the location again if you are working with a module you already checked out.
Updating The Working Folder
Now that you already have a copy of the repository contents in your working folder, the update command synchronizes it with the main repository by transferring the bits and pieces that changed.
You can also "update" your working folder to any branch, tag, or date, even from the unstable to the stable. For instance, suppose you were testing KDE 3.2 release candidate (during feature freeze), using the head branch. But in January 2004, the KDE_3_2_BRANCH was created, and HEAD was open again for commits. To continue testing KDE 3.2, you should update to the KDE_3_2_BRANCH, otherwise you will be testing KDE unstable. Later in the release cycle, you can easily go back to the HEAD branch, no problem!
Cervisia names the working folder "sandbox". To update a module / working folder, do the following actions.
- Click the "File" menu then the "Open Sandbox..." menu item.
- Select a working folder / module in the file dialog.
- Click the "File" menu then the "Update" menu item, or simply press the Update button in the toolbar.
- Note that Cervisia performs menu and toolbar actions only to selected files and folders. If you select a file, only it will be updated, but if you select a folder, the whole folder will be updated if you checked the "Update Recursively" check box in the Settings Menu, Cervisia will update all subfolders too.