Home > Data Modeler Concepts and U... > Using Versioning
Data Modeler provides integrated support for using the Subversion versioning and source control system with Data Modeler designs. You can store designs in a Subversion repository to achieve the usual benefits version control, including:
Storing the "official" versions of designs in a central repository instead of in various folders or directories.
Enabling multiple developers to work on the same design, coordinating their changes through the traditional Subversion checkout and commit processes.
The Data Modeler documentation does not provide detailed information about SVN concepts and operations; it assumes that you know them or can read about them. For information about Subversion, see http://subversion.tigris.org/
. For Subversion documentation, see http://svnbook.red-bean.com/
.
To access the versioning features of Data Modeler, use the Versioning menu.
If you create any versioning repositories or connect to any existing repositories, you can use the hierarchical display of repositories and their contents in the Versioning navigator. (If that navigator is not visible, click View, then Versioning.)
Related Topics
About Subversion and Data Modeler
Basic Workflow: Using Subversion with a Design
Data Modeler Concepts and Usage
Before you can work with a Subversion repository through Data Modeler, you must create a connection to it. When you create a local Subversion repository, a connection to it is automatically created, and this can be seen in the Subversion Navigator. You can subsequently edit the connection details.
Existing files must be imported into the Subversion repository to bring them under version control. Files are then checked out from the Subversion repository to a local folder known as the "Subversion working copy". Files created in Data Modeler must be stored in the Subversion working copy.
Files newly created within Data Modeler must be added to version control. Changed and new files are made available to other users by committing them to the Subversion repository. The Subversion working copy can be updated with the contents of the Subversion repository to incorporate changes made by other users.
The Pending Changes window is displayed if you click Versioning, then Pending Changes, or when you initiate an action that changes the local source control status of a file. This window shows files that have been added, modified or removed (locally or remotely), files whose content conflicts with other versions of the same file files that have not been added to source control files that are being watched, and files for which editors have been obtained. You can use this information to detect conflicts and to resolve them where possible.
The Outgoing Changes pane shows changes made locally, the Incoming Changes pane shows changes made remotely, and the Candidates pane shows files that have been created locally but not yet added to source control. You can double-click file names to edit them, and you can use the context menu to perform available operations.
To use Subversion with a Data Modeler design, you must have the following:
A folder or directory on your local system to serve as the working directory for the design. You create the design in this working directory, save the design to this working directory, and open the design from this working directory.
A Subversion repository to which you can connect, and in which you can create under branches
a branch for the initial version of the design (and later any subsequent versions).
The following are suggested basic steps. They are not the only possible steps or necessarily the "best" steps for a given project. These steps reflect the use of the Versioning navigator and the Import wizard within Data Modeler to perform many actions; however, many actions can alternatively be performed using a separate SVN repository browser (such as the TortoiseSVN browser) and using SVN commands on your local system.
On your local system, create a directory or folder to serve as the parent for design-specific working directories. For example, on a Windows PC create:
C:\designs
On your local system, create a directory or folder under the one in the preceding step to serve as the working directory for the design you plan to create. For example, for a design to be named library
, create:
C:\designs\library
In Data Modeler, create the design (for example, the library design in Data Modeler Tutorial: Modeling for a Small Database), and save the design to the working directory that you created For example, save the design to:
C:\designs\library
Saving the design causes the .dmd
file and the related directory structure to be created in the working directory. (The .dmd
file and the directory structure are explained in Database Design.)
Close the design. (Do not exit Data Modeler.)
Create an SVN connection to the repository that you want to use.
In the Versioning navigator, right-click the top-level node (Subversion) and select New Repository Connection.
In the Subversion: Create/Edit Subversion Connection dialog box, complete the information. Example repository URL: https://example.com/svn/designs/
Create a branches
directory under the repository path.
In the Versioning navigator, right-click the repository path and select New Remote Directory.
In the Subversion: Create Remote Directory dialog box, complete the information, specifying the Directory Name as branches
.
Create a project-specific branch under the branches
directory.
In the Versioning navigator, right-click the branches
directory and select New Remote Directory.
In theSubversion: Create Remote Directory dialog box, complete the information. Example Directory Name: library
For example, if you plan to create the library design in Data Modeler Tutorial: Modeling for a Small Database, the URL in the repository for this branch might be:
https://example.com/svn/designs/branches/library
Use the Subversion: Import to Subversion wizard to import the design files into the repository. Click Versioning, then Import Files, and complete the wizard pages as follows.
Destination: Specify the SVN connection and the repository path into which to import the files. Example: root/branches/library
Source: Specify the source directory from which to import the files (that is, the directory containing the .dmd file and the design-specific folder hierarchy). Example: C:\designs\library
Filters: Accept the defaults and click Next.
Options: Accept the defaults and click Next.
Summary: View the information and click Finish.
The SVN Console Log shows the progress as files are added. After the files are added, the Handle New Files dialog box is displayed.
In the Handle New Files dialog box, select Do Not Open Files and click OK.
To see the files that have been added, click the Refresh icon in the Versioning navigator tab.
For subsequent work on the design, follow the usual workflow for Subversion-based projects (SVN Update, SVN Lock, modify files, SVN Commit).