Use Source Control Management with MUD

You can use source control management with your multiuser development environment.

For example, if you've an existing repository under multiuser development and you want to begin using source control management, you might follow the steps described in the following subsections:

Put the MUD Master Repository and MUD Log File Under Source Control

Use this procedure to put the MUD master repository and MUD log file under source control.

Run the mhlconverter command-line utility to convert your MUD log file (*.mhl) to an XML file.

See Save an Existing Repository File in MDS XML Format to convert your master MUD Oracle BI repository file to a set of MDS XML files on the file system.

  1. At the command prompt, type mhlconverter with the input MHL file name and path, and the output XML file name and path. For example:

    mhlconverter -I C:\MUD\mud_repository.mhl -O C:\MUD\mud_repository.xml

  2. Check the MDS XML files and XML-format MUD log file into your SCM system.

Check In New Versions of the MUD Master and MUD Log File to Source Control

After creating and checking in the initial version of the master MUD repository, you need to check in updated versions of the MUD master repository on an ongoing basis.

This section describes two different ways to perform this task.

Manually Check In the Updated MUD Master Repository and Log File

Use these steps to manually check in changes to the master Oracle BI repository and log file that have occurred as part of the multiuser development process.

Consider using the automated check-in method described in Use a Script to Check In the Updated MUD Master Repository and Log File if you've a large repository. See Create an SCM Configuration File.

  1. Open the latest copy of the master Oracle BI repository file in the Model Administration Tool.

  2. Create or select the appropriate SCM configuration file.

  3. Select File, then select Source Control, then select Link to Source Control. Select the directory that contains the MDS XML version of the master MUD repository.

    Using Link to Source Control isn't recommended for large repositories and might cause time-outs.

  4. Click Save to save changes from the master MUD repository into the MDS XML files under source control. The Model Administration Tool determines which files to add, check out, modify, and delete and issues the commands to your SCM system.

  5. Close the Model Administration Tool.

  6. Follow these steps to update the MUD log file:

    1. In your SCM system, check out the XML-format MUD log file.

    2. Use the mhlconverter utility to overwrite the XML-format MUD log file with the latest changes from the .mhl version.

    3. Check in the latest XML-format MUD log file to your SCM system.

  7. Check all changes into your SCM system.

It's recommended that you perform the steps in this section regularly to avoid having too many changes in a single transaction.

Use a Script to Check In the Updated MUD Master Repository and Log File

As an alternative to manually checking in changes, you can create a script to perform the check-in tasks and then schedule it to run at regular intervals.

See Compare Repositories Using comparerpd.

  1. Identify the latest copy of the master Oracle BI repository file that you want to check into your SCM system.

  2. Identify the last version of the master Oracle BI repository file that was checked into the SCM system. You can review the latest XML-format MUD log file under source control to determine this version.

    If you don't have the last checked-in version of the master repository in Oracle BI repository file format, you can use the biserverxmlexec utility with the -D option to read the latest MDS XML files checked into source control and re-create an Oracle BI repository file version.

  3. Use the comparerpd utility with the -M option to compare the latest copy of the master Oracle BI repository file, the modified version, with the version that was last checked in, the original version. An MDS XML format diff is generated.

  4. Create a script that does the following:

    1. Reads the MDS XML diff directory to identify which files are present.

    2. Issues commands in source control to check out the identified files or add new files.

    3. Copies the latest version of the files from the MDS XML diff directory to the source control directory.

    4. Reads the oracle\bi\server\base\DeletedFiles.txt file inside the MDS XML diff directory to determine which files to delete.

    5. Issues commands in source control to delete the appropriate files.

    6. Checks out the MDS XML-format MUD log file, runs the mhlconverter utility to convert the latest MHL-format log file to XML format, overwrites the existing MDS XML-format MUD log file with the new one, and checks it in.

    7. Performs all necessary check-in steps in the SCM system.