Pramati Technologies

Working with SourceSafe

The MS SourceSafe 6.0 integration in Studio facilitates users to perform SourceSafe operations from within studio, and is coupled with Desk and works on the files present in the Desk ONLY. SourceSafe supports only Windows platform in this version. The machine using Studio with SourceSafe must have The MS SourceSafe 6.0 client installed.

Studio SourceSafe module cannot handle any hidden internal/meta files. Use SourceSafe to

Configuring SourceSafe as a tool

The SourceSafe tool is deployed in Studio by default if the platform is Windows.

You can undeploy it by selecting Tools > Configure. In the dialog that pops up, uncheck the option SourceSafe from Available Tools section. To deploy it again, check SourceSafe in the dialog.

To configure SourceSafe, click SourceSafe > Preferences on the main menu. This brings up the SourceSafe-Preferences dialog box, where the information regarding

Setting Project Mappings

The SourceSafe System maps the working directories provided in the mapping with the SourceSafe project. The SourceSafe project for operations on any local file is taken from this map.

It is calculated recursively. For example, if c:/temp is mapped to $/jacob, c:/temp/com will be mapped to $/jacob/com.

To override this, you can provide explicit mapping. For example, to map c:temp/com/pramati/test to $/test, you can directly do so.

The maximum length match is calculated which calls SourceSafe project. Selecting SourceSafe > Set Preferences displays the following details:

SrcSafe.ini Shows the specified path for SrcSafe.ini file, for the SourceSafe database.

User name Shows the User name.

SourceSafe project Shows the path of the SourceSafe project. For example: $/studio/Desk/deskEJB

Working directory Shows the current working directory on the local machine corresponding to the SourceSafe project. For example: c/temp/EJB

Auto mapping Whenever you get or create a module from/on SourceSafe, the corresponding entry is automatically added to the table.

Add Clicking on the Add button brings up the Add SourceSafe Project Mappings dialog, which allows adding new project mappings. The options provided are:

Edit Select an entry and click on Edit to make the desired changes in the Edit SourceSafe Project Mappings dialog. The options provided are:

Remove Select the specific row and click on the Remove button to delete the project mapping.

Displaying dialog boxes

Use this option to either execute the commands silently (without popping the dialog) or execute the options using the dialogs. All the options are by default, checked.

Checkout Displays the check out dialog when the option is used.

Checkin Displays the check in dialog when the option is used.

Undo Checkout Displays the undo check out dialog when the option is used.

Add Displays the add dialog when the option is used.

Get Latest version Displays the get latest version dialog when the option is used.

Logging to SourceSafe

Whenever the Desk is opened, SourceSafe asks for all the passwords being used in this Desk. These passwords are kept in memory for the entire studio session. If the passwords are not provided here, then the same is asked when the configuration is changed.

To Login explicitly, click on SourceSafe > Login from the main menu.

Selecting External Difference Program

Check this field if the SourceSafe is to use an external difference program. Browse for and enter the location of where the external program is installed. Keeping the option unchecked uses the default Studio Diff tool. Click here to know more about Studio Diff tool.

After configuring the SourceSafe, start using it in Studio. The status of the files/folders is displayed in the Explore Panel with the help of different icons. The icons used are:

Black tick Shows that the selected item is under SourceSafe - but not checked out.

Red tick Shows that the selected item is checked out by the user.

Green tick Shows that the selected item is checked out by another user.

Creating a New Project on SourceSafe from Desk Module

To create a new project on the SourceSafe from the Desk module, right click on the Desk module, and select 'Create Module'. This displays the following dialog:

User Specify here the username.

SourceSafeIni Specify here the location of the SourceSafe.Ini file.

SourceSafe Project Specify here the location of the SourceSafe project.

Comments Any comments you wish to give for the checkout.

Comments History This drop down list displays the previously entered comments.

File Type Specify here the file type - auto, binary or text.

Recurse This option is checked by default. Un-checking this option adds the folder without the sub-folders.

Keep Checked out Checking this option, checks out the file immedeately after adding it.

Get Module From SourceSafe

To get a module from SourceSafe and create a Desk module, fill in the following information:

Under the Desk Module section, fill in the following information:

Under the section, SourceSafe Project, enter the following information:

Checking Out files

To checkout files from the SourceSafe server into the local system, you can either select a module/item in the Desk tree view, and right click to see the following options, or use the SourceSafe > Checkout menu option for the file active in the editor dialog.

Bring up the Checkout dialog by right clicking on the Desk/module (existing in SourceSafe) > Checkout. The screenshot below displays how to checkout a new SourceSafe module on the Desk.

Fill in the following information to checkout the module or files as required:

Comments Any comments you wish to give for the checkout.

Comments History This drop down list displays the previously entered comments.

Do not Make local Checking this does not refresh the SourceSafe copy during checkout. To refresh the same, keep the option checked.

Do not show this dialog again Checking this option does not display the dialog again.

After entering all the information required, click OK. This checks out the modules or the files under the Desk or module, as required.

Check In

Use Checkin to check in the files from the local system into the SourceSafe server. The following dialog is displayed:

Comments Any comments you wish to give for the checkin.

Comments History This drop down list displays the previously entered comments.

Recurse This option is checked by default. Un-checking this option adds the folder without the sub-folders.

Keep Checked Out Checking this option, keeps the file checked out even after it has been checked in.

Do not show this dialog again Selecting this option won't show the dialog the next time you check in a file.

Undo Checkout

Use this option to undo the most recent check out, which would prevent any changes from being made. The following dialog is displayed:

Local Copy Use this field to replace the local copy with the latest SourceSafe version, or delete or leave the local copy after the undo checkout operation.

Recurse This option is checked by default. Un-checking this option undoes the folder checkout without the sub-folders.

Do not show this dialog again Selecting this option won't show the dialog the next time you undo a checkout.

Add to SourceSafe

Folder/File > Right Click > SourceSafe > Add

Use this option from the main menu in Studio to add files stored locally into the SourceSafe repository. The directory under which the files exist must already exist in the SourceSafe repository.

When a file is added to the SourceSafe, the SourceSafe resolves the type of the file internally and adds it as a binary or text file.

Files and folders can also be added to the SourceSafe on a right click. To do this, right click on the specific file/folder > SourceSafe > Add, and then commit them.

Use the SourceSafe Add from the main menu to add the active file (the file open in the Display Panel) to SourceSafe.

Getting Latest Version of a file

There are two ways to fetch a copy of the latest version. You can either select a module/item/folder in the Desk tree view, and right click to see the following options, or use the SourceSafe > Get Latest Version.

Clicking 'Get Latest Version' displays the following dialog:

Recurse Check this option to get the files and folders recursively.

Add new files to Desk Check this option to add the newly added files to Desk.

Make writable Check this option to make the local copy writable.

Do not show this dialog Selecting this option would not display it the next time you use the option.

'Recurse' and 'Add new files to Desk' options are not available for Editor menu options, and operations done on the Desk Items.

In case if a file on the local system is writable, and you perform a 'Checkout' or a 'Get Latest Version', it displays the following message and options:

Replace Using this, you would lose any changes you had made in the file, if the latest version was created before you made the changes.

Skip Use this option to skip this file from the operation.

Merge Using this option would help you save changes made in the latest version, and also any other changes that were made before the latest version was fetched.

Cancel Use the option to cancel the operation.

Apply to all Use this option to select all the options provided.

Remove from SourceSafe

The SourceSafe integration currently supports removal of files only.

There are two ways to remove a file from SourceSafe.

Either right click on the specific Item > SourceSafe > Remove, or use SourceSafe > Remove from the main menu to delete the currently active file.

This option is used to mark the items/files to be removed from the SourceSafe repository. These files and folders have a black cross in their icon.

Show Differences

Use this option in Studio to compare the latest revision of the file in the SourceSafe repository with the file saved locally. Studio uses the Studio diff tool to display the differences, by default. To use an external difference program, configure it using the Preferences dialog. The default action used by SourceSafe is that it compares the working files with the revisions they were based on, and report any differences that are found.

If any file names are given, only those files are compared. If any directories are given, all files under them will be compared.

Use SourceSafe > Show Differences from the main menu to compare the latest revision of the file in the SourceSafe repository with the file saved locally. The file referred above is the active file (the file open in the Display Panel).

Studio Diff Tool

The Studio Diff Tool can be used both with SourceSafe.

Click on SourceSafe > Show Differences from the main menu, or right click on the required file and select SourceSafe and then Differences to bring up the Studio Diff tool. The Diff tool displays the selected files side-by-side in a splitter view, which is called the File Comparison view (or just the "diff view" for short).

Using Studio Diff Tool:

Different colors are used to highlight the differences between the two files. Green areas indicate the lines that were aded to the modified file, and did not exist in the original file. Areas highlighted by blue lines indicate that the selected lines were modified in some way in the new file. Areas highlighted by red lines on both sides indicate that the selected lines were deleted in the modified file.

There are different ways of stepping through the differences in the two files. The gutter on the right hand side displays the summary of differences in the two files with the correct colors. Clicking on a specific color takes the cursor to the required difference.

Use the back and forward arrow keys, or the back and forward arrow buttons provided in the tool to move to the previous and next difference. Use Ctrl + back and Ctrl + forward arrow keys, or the and arrow buttons provided in the tool for moving to the first and the last difference directly. Use Ctrl + up and Ctrl + down arrow keys to move between the previous and the next differences.

Once you have selected a difference (either by using the arrow or by clicking it with the mouse), synchronize one side with the other by either using the right and left arrow keys, or the scroll bars provided.

Use the Toggle SplitPane button to view the two files either vertically or horizontally. Clicking on the button, highlights the differences by underlining them with a red line in the original file. The state of this button is remembered after the tool is closed and re-opened.

Clicking on the button, displays the differences after ignoring the case of the letters. The state of this button is not remembered after the Diff tool is closed and re-opened.

Clicking on the button, displays the differences after ignoring the blank spaces. The state of this button is not remembered after the Diff tool is closed and re-opened.

History

This shows the History of SourceSafe operations done on the file/folder.

Refresh Status

Use the SourceSafe > Show Status option to view the Status of a folder or a file in the SourceSafe repository. Based on the operations performed on a checked out file, and what operations others have performed to that file in the repository, a file can be classified in a number of states.

This option allows you to view the status of the active file (the file open in the Display Panel).


Pramati Technologies  © Copyright   TOCPREVNEXTINDEX