|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Managing Files in Source Control
|
|
|
|
Although every source control system offers an array of options for managing source files, all systems provide three basic functions for files that are in the system:
- Get -- Copies the most recent version of a file from source control to the working directory. The default attribute is usually read-only.
- Check In -- Returns the file to source control. You can set options for handling the files in your working directory, such as removing them or setting them to read-only. These options provide a level of protection if you try to work on a file that is not checked out.
- Check Out -- Overwrites the copy of the file on your working directory (if you chose to leave a copy there) with a read/write copy from source control. Most source control systems lock files that are checked out so that no one else can open them.
|
|
|
|
Check in options |
|
|
|
Some source control systems provide options for protecting the local copy of a file after it is added or checked in. The system can flag the local file as Read-Only or remove it from the local directory. If a local copy of a file is edited after it is checked in, the changes are overwritten when the file is checked out again. Check your source control system's documentation for available options.
|
|
|
|
Command options |
|
|
|
Studio provides a variety of ways to access source control commands:
- Right-click on a file in the file pane, select Source Control on the context menu and select a command. The context menu contains the complete source control command set.
- Select a file in the file pane, click Tools > Source Control on the main toolbar and select a command.
- Double-click on a file to open the local copy of the file as read-only, check it out, or update the local file with the current version in source control and open it as read-only.
The availability of commands for the selected file is based on the file's current status in the source control system.
|
|
|
|
Adding files and subdirectories |
|
|
|
As your development project progresses, you can add files and subdirectories to source control.
|
|
|
|
To add a new file to source control:
|
|
|
- Save the new file in the appropriate sub-directory of the working directory.
- Add the file to the Studio project.
- You will be prompted to add the file to source control.
|
|
|
|
To create a new subdirectory:
|
|
|
- Add the subdirectory to your working directory.
- Create a new folder in the correct location in the Studio project.
- Add a file to the subdirectory and then add the file to the appropriate folder in the Studio directory.
- Add the file to source control. When you add the file, it automatically creates a new subproject for the new folder in the Studio project.
|
|
|
|
Synchronizing files |
|
|
|
A significant feature of source control for team development is the ability to update your working directory as files are added, changed, and removed from source control by team members. You can run these maintenance procedures based on the level of source control activity of your team.
|
|
|
|
To synchronize project files with source control:
|
|
|
- Right-click on a project in the Project Folder pane to open the context menu.
- Select Synchronize with Source Control. The dialog contains tabs for adding and removing local files based on their status in source control.
|
|
|
|
To add files from source control to your working directory:
|
|
|
- Click the Add tab in the Synchronize Projects dialog.
- The list shows files in source control that are not in your local project.
- Click the list check box of the files you want to add, click Add, and click Close to update the local project.
|
|
|
|
To remove local files:
|
|
|
- Click the Remove tab in the Synchronize Projects dialog.
- The list shows local files that are not in the source control project.
- Click the list check box of the files you want to remove, click Remove, and click Close to update the local project.
|
|
|
  
|
|
|
AllaireDoc@allaire.com
Copyright © 1998, Allaire Corporation. All rights reserved.
|