Adding files to version control
Comparable terms
- In CVS: Add file or files to module
- In Visual SourceSafe: Add file or files to project
Adding files to a repository is a separate process from adding them to a JBuilder project. Adding files to a JBuilder project does not affect the repository.
Adding a file to a repository requires two steps, which JBuilder does for you. The first step is called adding the file: it's a temporary measure unless the second step takes place. The second step is called either checking in the file or committing the file: it places the file into the repository so that the file becomes available to other users of the repository.
This feature uses dialog boxes in the CVS and Visual SourceSafe integrations.
For a glossary of generic version control terms, please see the Version handling glossary in "Comparing files and versions" in Building Applications with JBuilder.
CVS
In CVS, a file must exist in the project directory or one of its subdirectories before it can be added to the module. In JBuilder, a file can be added from any directory available to you: JBuilder simply creates a path to that file. How you add a file to CVS depends on whether the file is initially inside the project directory or outside the project directory.
To add a file to CVS that's initially inside the project directory,
- Copy or move the file into the directory of the project that's under CVS version control.
- Add the file to CVS:
- If it's not open, right-click on it in the project pane.
- Select CVS from the context menu.
- Select Add File from the submenu.
- If adding a single file, enter a comment when prompted and click OK to proceed.
If adding multiple files, check the file list JBuilder displays in the Add Files dialog box and click OK to proceed.
- Click OK in the confirmation dialog box to return to the IDE.
- If the file is open in the content pane, select Team from the main menu bar.
- Select Add File.
- If adding a single file, enter a comment when prompted and click OK to proceed.
If adding multiple files, check the file list JBuilder displays in the Add Files dialog box and click OK to proceed.
- Click OK in the confirmation dialog box to return to the IDE.
If you initially added the file to the JBuilder project when the file was outside the project directory,
- Copy or move the file into the directory of the project that's under CVS version control.
- Remove the file from the JBuilder project by selecting the file in the project pane and clicking the Remove File button
. The file is not deleted from its present location, it's only removed from the current project.
- Add the file, in its new location, back into the JBuilder project by clicking the Add Files/Packages button
and selecting the file copy that's inside the project directory.
- Add the file to CVS:
- If it's not open, right-click on it in the project pane.
- Select CVS from the context menu.
- Select Add File from the submenu.
- If adding a single file, enter a comment when prompted and click OK to proceed.
If adding multiple files, check the file list JBuilder displays in the Add Files dialog box and click OK to proceed.
- Click OK in the confirmation dialog box to return to the IDE.
- If the file is open in the content pane, select Team from the main menu bar.
- Select Add File.
- If adding a single file, enter a comment when prompted and click OK to proceed.
If adding multiple files, check the file list JBuilder displays in the Add Files dialog box and click OK to proceed.
- Click OK in the confirmation dialog box to return to the IDE.
Visual SourceSafe
To add a file to VSS, it must exist within your project directory or one of its subdirectories. If it's initially outside your project directory, remove it from the project, move or copy it into the project tree, re-add it to JBuilder, then add it to VSS.
If the file you want to add is active in the content pane, add it to VSS by selecting Team|Add File.
If the file is not active, or if you want to add more than one file,
- Select the files you want to add in the project pane.
- Right-click any of the selected files. The context menu appears.
- Select Visual SourceSafe from the context menu. The Visual SourceSafe submenu appears.
- Select Add File from the submenu. The Add To Visual SourceSafe dialog box appears.
What the dialog box looks like depends on whether you're adding one file or more than one:
- If you're adding one file, the dialog box prompts you for a comment. Enter a comment describing the file you're adding.
- Click OK to close the dialog box and add the file to the Visual SourceSafe database.
- Click OK to close the confirmation dialog box and return to the IDE.
- If you're adding more than one file, the dialog box lists the files you selected in the project pane.
Click OK to continue.
- Click OK to close the confirmation dialog box and return to the IDE.