Adding Elements, Folders, Dictionaries to the Source Control Bank

All elements, Folders, Dictionaries are versionable. Any element that is added in Source Control as part of its parent can be individually versioned separately from its parent. For instance, this might be a requirement if you have a number of <Ispec> classes within a segment which different developers want to work on independently.

To prevent one developer locking the entire set of elements by checking out one element, you can separately version the child elements, and break them away from their parent element. You can move or add version files when project and files are managed with Source Control, but the act of moving a file to a folder, is a ‘Remove’ and ‘Add’ in Source Control.

The elements can either exist in the Source Control Bank individually or as part of some ancestor that has been versioned. The top node (Model) is always versioned, and so everything in the Model is initially versioned as part of the Model, unless you have set the VersionFile Property of specific Elements in the Model. In that case, the source bank contains versioned files representing the Model and each of the Elements with their VersionFile Property set. The VersionFile Property of an element in a Model is assigned a value when created depending on the settings in the Policies page. If the VersionFile Property of elements in a Model is set and the newly added elements are not initially versioned as part of the Model, the Model is not locked. Note that everything in a Model belongs to some versioned file in the source bank, be it the Model node file or another file.

To make an Element, Folder, Dictionary versionable, perform the following:

  1. Select the element, Folder, Dictionary in Class View, or Members Tab of the document window.

    Note: Select the element to be versioned separately, if you want to version an element separately from the parent.

  2. If it is not already open, open the Properties window from the View menu.

  3. Navigate to the VersionFile Property.

  4. Type a name for the file that contains details of the element in the Source Control Bank. The file name must be unique across the entire Model.

    The versioned element(s) file name(s) is now displayed in the Solution Explorer window. The plus symbol next to the element icon indicates that you can now add the elements to the Source Control.

    Note: When you add an initial element to Source Control, the entire Model is also added. This is due to the dependency that elements have with each other. On importing the .smproj file from Source Control, the Import wizard allows you to import all the model files along with the .smproj file in one go.

When an element is separately versioned from its parents, ensure to note the following behavior.

If Source Control detects a newly added or removed versionable element that is added or removed by a different user, the project file and Source Control information for the user and session should be updated. The project file is checked out and you are prompted to add the new versionable elements to the Source Control.

Following are the two options available when prompted for adding the newly detected elements.

The parent and all siblings of the new element are checked out prior to including the new element, unless one or more of the siblings was separately versioned. This ensures that the controlled parent and possible siblings of the new element are associated with it.

Note that when a project is added to Source Control, all the files are added to one single folder. AB Suite System Modeler allows users to add or remove folders to the Solution Explorer. A folder created in the Solution Explorer is also represented by a folder on the hard disk.

Files can be moved to and from a folder (in the Solution Explorer) by:

When a file is moved to or from a folder and the file exits on disk, the file on disk also moves to the new location. If the file is under Source Control, the history of the file is lost, because the file is deleted from the Source Control bank in the old location and added to the Source Control bank at the new location. Read the user manual of the Source Control tool of your choice on how to recover a deleted file and how to move files if you want to preserve this history.

Migrating an Existing Version Control Bank

If you have an existing version control bank, you can migrate the elements in the bank using the History Migrator Utility. Refer to the History Migrator Online Help for more information on this tool.

After migration, three model files representing Dev, Test, and Prod environments exist.