Previous Next
Check out and check in

Remember that you checked in the project to the Repository from the SSWE, so the view to the project files is read only. To modify a file, you first need to check it out.
To review how to check in a project from the SSWE, please refer to Checking In the project from the SSWE.
In the Project Editor
The file which you will modify is
ansi.c , which belongs to the lib.shared project. To check out ansi.c :

  1. In the Project Tree, make sure that the lib.shared project is checkmarked, so that you can see its files.
  2. In the File List, highlight ansi.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
    ansi.c is now displayed in bold typeface, which means 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.
    The File List entry for
    ansi.c should now look like this:

    Click for full size, then use Back button

  6. To load the now writable ansi.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 first line of 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 ansi.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. You should 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 ansi.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.
    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.
  4. Press Ok.
    In the File List, notice that
    ansi.c is now displayed in regular typeface, which means that it is now read-only and located in your PWE.
  5. To look at the history of ansi.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 .
  6. Clear both the History and Lockers check boxes.