Previous Next
Check out and check in

Remember that you checked in the project to the Repository from the SSWE, see Checking In the project from the SSWE, so the view to the project files is read only. To modify a file, you first need to check it out.
In the Project Editor
The file which you will modify is
complex.C , which belongs to the complexlib.shared project. To check out complex.C :

  1. In the Project Tree, make sure that the complexlib.shared project is checkmarked, so that you can see its files.
  2. In the File List, highlight complex.C by clicking on it once.
  3. Choose File > Check Out....

    Click for full size, then use Back button

  4. In the Check Out dialog, press Exclusive Lock.
    In the File List, notice that
    complex.C is now displayed in bold typeface, which indicates that it is writable.
  5. Select the Lockers check box at the bottom of the Project Editor. This check box allows you to see which users have locked which files.
    If you scroll to the right of the File List, you will notice that the entry for
    complex.C now looks similar to this:

    Click for full size, then use Back button

  6. Clear the Lockers check box.
  7. To load the, now writable, complex.C file into the Source Editor, double-click on it in the File List.
In the Source Editor
All we want to do here is to make a modification, so that a newer version of the file exists.
  1. Enter a comment in the file.
    Notice that the Source Editor now indicates that the file has been modified.
    • On Unix, the icon in the upper-left corner of the Source Editor indicates that the file has been modified.
    • On Windows NT/95, the write permissions of the loaded file and its status are indicated in the title bar of the Source Editor.
  2. Save complex.C by choosing File > Save.
  3. Close the Source Editor.
Checking in the file
Once you are satisfied with the changes you have made to a file, you check it back in. The rest of the team then has access to the modified file (after the shared working environments have been updated - see next chapter).
  • Note that "being satisfied with changes", above, means that, at the very least, your code is compilable. Do NOT check in untested, possibly uncompilable, code!

  • Since you only added a comment to the checked out file, it is safe to check it back in.
In the Project Editor
You can check in files either from the Project Editor or the Source Editor. Here, you will use the Project Editor (the menu command is the same in both tools).
  1. In the File List, make sure complex.C is highlighted. This is the file you checked out, as you can see by the bold typeface.
  2. Choose File > Check In....
  3. In the Check In dialog, enter a comment in the Comment field and press Ok.
    You can leave the Version field blank, because SNiFF+ will automatically increment the version number to 1.2. Also leave the Change Set field blank; this is usually only used for multiple files.

        Note
        Notice that the file name no longer appears in bold typeface because it is now read-only.

  4. To look at the history of complex.C , highlight the file in the File List and select the History check box at the bottom of the Project Editor.
    Notice that the
    HEAD version of the file is now version 1.2 .
    Take a look at the history of some of the other project files. Since you have not modified those files since checking them in, their
    HEAD version is still 1.1 .
  5. Clear the History check box.