Saturday, February 22, 2014

Comparing Repositories Using the Compare Dialog and comparerpd

Comparing Repositories Using the Compare Dialog

This section explains how to use the Compare dialog in the Administration Tool.
To compare two repositories:
  1. In the Administration Tool, open a repository in offline mode.
    The repository that you open in this step is referred to as the current repository. 
  2. From the File menu, select Compare.
  3. In the Select Original Repository dialog, select the repository you want to compare to the open repository. Select Repository from the submenu to select a binary repository file in RPD format, or select XML to select a set of MDS XML documents.
  4. In the Open Offline dialog, enter the repository password and click OK.
  5. Use the Compare repositories dialog to review the differences between the two repositories.
    Compare Repositories Dialog
    Description of Figure 17-1 follows


    Compare Repositories Dialog: Change Column
    ChangeDescription
    Created
    Object was created in the current repository and does not exist in the original repository.
    Deleted
    Object exists in the original repository but has been deleted from the current repository.
    Modified
    Object exists in the original repository but has been modified in the current repository.

    Compare Repositories Dialog: Buttons
    ButtonDescription
    Filter
    Opens the Comparison Filter dialog to enable you to filter the objects that appear in the Compare repositories dialog by type of change and type of object. You can specify what you want to appear and what you want to be hidden. If you select Group created and deleted objects, the tool filters out the child objects of created and deleted objects, so that only the parent objects are shown. By default, all items are shown.
    Find
    Search by an object Name and Type (such as Initialization Block).
    Select
    Enables you to select a repository to compare with the current repository. Select Repository from the submenu to select a binary repository file in RPD format, or select XML to select a set of MDS XML documents.
    Find Again
    Search again for the most recent Find value.
    Diff
    Differences between the current repository and the original repository.
    Save
    Saves a list of the differences between the two repositories.
    Stats
    Provides the number of changes by Change type.
    View 1
    Opens an object in the original repository in read-only mode.
    Edit 2
    Opens an object in the current repository in read/write mode.
    View 2
    Opens an object in the current repository in read-only mode. This button is only displayed when viewing MUD history, or when the current repository is open in read-only mode.
    Equalize
    Opens the Equalize Objects dialog so that you can model changes to the Upgrade ID of the objects. 
    Create Patch
    Creates a patch file that contains the differences between the repositories. 
    Mark
    Marks the object you select. Boxes appear around created and modified objects. To remove marks, from the File menu, choose Turn off Compare Mode.

Comparing Repositories Using comparerpd

You can also compare repositories and create patch files using the comparerpd utility. This feature is especially useful when you want to compare repositories or generate patches on Linux and UNIX systems where the Administration Tool is not available. The compare utility is available on both Windows and UNIX systems.
Before running comparerpd, you must first run bi-init to launch a command prompt or shell window that is properly initialized.

Syntax 
The comparerpd utility takes the following parameters:
comparerpd [-P modified_rpd_password] -C modified_rpd_pathname 
[-W original_rpd_password] -G original_rpd_pathname {-O output_csv_file_name | 
-D output_patch_file_name | -M output_mds_xml_directory_name} -E -8
Where:
-P modified_rpd_password is the repository password for the modified repository, also called the customer or customized repository.
-C modified_rpd_pathname is the name and location of the modified repository.
-W original_rpd_password is the repository password for the original repository.
-G original_rpd_pathname is the name and location of the original repository.
-O output_csv_file_name is the name and location of a csv file where you want to store the repository object comparison output.
-D output_patch_file_name is the name and location of an XML patch file where you want to store the differences between the two repositories.
-M output_mds_xml_directory_name is the top-level directory where you want to store diff information in MDS XML format. 

For example:
comparerpd -C customer.rpd -G original.rpd -O diff.csv
Give password for customer repository: my_cust_password
Give password for original repository: my_orig_password
This example generates a comparison diff file in CSV format called diff.csv from the customer.rpd and original.rpd repositories.
comparerpd -C customer.rpd -G original.rpd -D my_patch.xml
Give password for customer repository: my_cust_password
Give password for original repository: my_orig_password
This example generates an XML patch file called my_patch.xml from the customer.rpd and original.rpd repositories.


No comments:

Post a Comment