Managing a Project with a Source Control System

An additional benefit of creating projects is that you can more easily manage project files in a source control system. You can establish a relationship between a source control application and your project, so that you can manage check-out, check-in, and other source control operations without opening the source control application.

Why use source control?

Version source control for Web site content is an essential for coordinating team development of complex projects. A source control system does add a layer of file management responsibility, but it offers clear advantages for developers, managers, and support staff. Source control enables team members to do the following:

Source control systems really are about control; they are designed to control file management in application development and related work. Common terms, such as check-in, check-out, lock, and unlock, accurately describe the security procedures required for an effective source control system.

Supported source control systems

HomeSite uses the Microsoft-published interface called the Source Code Control (SCC) API to connect with a wide range of standard source control products; it can work with both client-based and server-based systems.

HomeSite automatically generates a list of source control applications detected on your system when you first select the Choose Source Control Provider command for a project. You can then select the appropriate provider from the list.

The user interface and command structure for source control applications varies from vendor to vendor, so check the documentation for your source control software for specific procedures and options.

Setting up a project in source control

There are three basic steps to establishing a relationship between your HomeSite project and your source control application. Note however that the exact procedure differs, depending on your source control application.

  1. Make sure that your source control application is installed on your machine and that it complies with the Source Code Control (SCC) API.

    Otherwise, HomeSitecannot detect it.

  2. Choose the source control application to use for your project.

    To start, right-click on the project root, select Source Control, then select Choose Source Control Provider.

  3. Map your project to the directory that you use for your source control application; for example, to check out and check in files.

    To start, click Map Project to Source Control button.

For more information, see Knowledge Base article 14802.

Integrating a project with Microsoft Visual SourceSafe

The following procedure takes you through the steps of creating a Microsoft Visual SourceSafe∆ (VSS) project, and then placing your HomeSite project files under VSS source control.

Visual SourceSafe uses the term project to refer to a distinct set of files stored in its database, so this procedure uses the term VSS project to distinguish it from a HomeSite project.

To set up a project in Visual SourceSafe:

  1. Create a VSS project.
  2. In VSS, select File > Set Working Folder and set the working folder to be the root folder for editing project files.
  3. In HomeSite, open the project that you want to add to source control.
  4. In the Projects tab, right-click the project root and select Source Control > Choose Source Control Provider.

    A list of the source control applications detected on your system appears.

  5. Select from the Provider dialog box.
  6. Right-click the project root and select Source Control > Map Project To Source Control.

    You might be required to login to VSS at this point.

  7. In VSS, select File > Add Files and add the contents of your HomeSite project directory to the VSS project folder.
  8. In VSS, select Tools > Options and set file handling rules, views, and other options as necessary.

    The relationship between the source control application and HomeSite project is established.

  9. To re-establish this connection in future HomeSite sessions, open the project that you mapped to the source control application.

Using source control in HomeSite

You can control your source directly from HomeSite or, if you must work directly in the source control application, you can open it from HomeSite.

To control your source from within HomeSite:

To open the source control application:

Displaying the Source Control toolbar

The Source Control toolbar contains buttons for working with a version source control system, for example to check in, check out, and add to source control. The toolbar commands are applied to the current document in the document window.

You can also access the toolbar commands by right-clicking in the Projects pane.


Note

You cannot add a file to source control unless it is located in the physical directory of a project that has been mapped to a source control application.


To display the source control toolbar:

  1. Right-click anywhere in the QuickBar and select Source Control from the drop-down list of toolbars.
  2. Drag the toolbar into place on the QuickBar.

If the options on the toolbar are disabled, open a project that is mapped to the source control application. This establishes a connection for the duration of your session.

Sharing project files in Visual SourceSafe

Knowledge Base article 14856 covers the steps required to set up multiple user access to project files in source control.

Administering multiuser projects in VSS

If you are responsible for setting up Visual SourceSafe access to files for multiple users, you should consult Knowledge Base article 16754

Comments