Version control process

The version control process includes the following:

Code repository preparation by a system administrator

The first step of your version control process is that a system administrator creates a code repository on an SVN server. This enables you to use the repository to track all changes made to applications objects as you create, develop, or extend the Service Manager applications.

To leverage the SVN version control system, follow these steps:

  1. Set up the SVN server and create the repository folder for the SMA-SM applications data.

  2. Set up the SVN client. To do this, follow these steps:

    1. Create a folder in your local drive to check the SVN code repository in and out. For example, you create "c:\svn\data."

    2. Check out the empty repository to your local folder.

  3. Configure SMA-SM to use the repository. To do this, add the following two new lines to the sm.ini file in the <Server Dir>/RUN/ directory:

    svc_rootdir: <Your check-out SMA-SM applications path, in this example, C:\svn\data>

    svc_mode:2

    Note Make sure that your SMA-SM server is installed on the computer that has the SVN client installed.

  4. Run the sm -svc_export command to export the SMA-SM applications data as XML files to the svc_rootdir folder.

    • Before you export the applications data records, be sure to stop the SMA-SM server.
    • For information about more parameters to export the applications data, see Parameters to import and export files.

    Your output folder should resemble the following:

    The XML files are exported to subfolders that are alphabetically-ordered by the unique key names of the applications, as shown in the following example for the ScriptLibrary folder:

  5. Commit all the files to the SVN repository.

    Note You should exclude any business-related records when you commit the files, as these types of records require a great deal of capacity and decrease efficiency. These types of records include the following, but your organization’s records may differ:

    Object Table
    Interaction incidents
    Incident probsummary
    Problem rootcause
    Problem Task rootcausetask
    Known Error knownerror
    Known Error Task knownerrortask
    Change cm3r
    Change Task cm3t

Development environment preparation by developers

Note Environment preparation is only required when a developer starts applications development for the first time or starts to use a new computer.

  1. Set up your SVN client. To do this, choose the command line client tools in SVN. The following example displays the command line client tools feature in TortoiseSVN:

  2. Create a folder in your local drive to check the SVN code repository in and out. For example, you create "c:\svn\data."

  3. Set up SMA-SM by adding the following two new lines to the sm.ini file in the <Server Dir>/RUN/ directory:

    svc_rootdir: <Your check-out SMA-SM applications path, in this example, C:\svn\data>

    svc_mode:2

    Note Make sure that the SMA-SM server is already installed on the same computer, and then restart the server to enable the added svc command.

  4. Check out the applications data files from the SVN repository to your local folder.
  5. Prepare a clean empty development database to import the applications data.

Development process by developers

  1. Update all the source code to the latest version from the code repository.
  2. Run the following command to import the XML files to the database:

    sm -svc_import -svc_cleanbuild:1

    Note For information about more parameters to import the XML files, see Parameters to import and export files.

  3. Modify the records by the SMA-SM client and then save the changes to automatically synchronize the XML files in the svc_rootdir directory, as shown in the following example for the process record:

  4. Check the modified code into the code repository. The commit window displays all the changed files.

    Note The commit window may not show all the changed files in the SM-APPS change list, and this problem occurs when the tables you have modified are not present in the svc_include.props property file in your <Server Dir>/RUN directory. To solve the problem, manually add the names of the tables to this file.

In this way, SVN retains a clear history of any changes made to a specific application.

Related topics

Implementing version control for your tailoring
Version control best practice
Parameters to import and export files
Applications data file represented in XML