Avoiding Rational Rhapsody repository corruption with Subversion

By default, Subversion treats IBM® Rational® Rhapsody® units as textual files and therefore does textual merges when you do an update operation. This approach damages the Rational Rhapsody model. To avoid repository corruption in Subversion when you use it with Rational Rhapsody, you must set up Subversion to process Rational Rhapsody units as non-textual files.

About this task

Each Rational Rhapsody unit in the Subversion repository needs to have the svn:mime-type property set to be treated as a non-textual file; for example, application/octet-stream. The non-textual file cannot begin with text/.

You can use the configuration file for Subversion to enable its automatic property setting feature and then map Rational Rhapsody unit extensions to the svn:mime-type property values to have Subversion treat Rational Rhapsody units as non-textual files.

Procedure

To set up Subversion to process Rational Rhapsody units as non-textual files and avoid repository corruption:

  1. Open the configuration file for Subversion. In Microsoft Windows, for example, this file might be in C:\Documents and Settings\Administrator\Application Data\Subversion.
  2. In the [miscellany] section of the configuration file, set the automatic property setting feature to yes, as shown in the following example:
    ### Section for configuring miscelleneous Subversion options.
    [miscellany]
    ...
    ### Set enable-auto-props to 'yes' to enable automatic properties
    ### for 'svn add' and 'svn import', it defaults to 'no'.
    ### Automatic properties are defined in the section 'auto-props'.
    enable-auto-props = yes
  3. In the [auto-props] section, map Rational Rhapsody unit extensions to the svn:mime-type property. In the following example, application/octet-stream is used.
    ### Section for configuring automatic properties.
    [auto-props]
    ### The format of the entries is:
    ###   file-name-pattern = propname[=value][;propname[=value]...]
    ### The file-name-pattern can contain wildcards (such as '*' and
    ### '?').  All entries which match will be applied to the file.
    ### Note that auto-props functionality must be enabled, which
    ### is typically done by setting the 'enable-auto-props' option.
    ...
    *.rpy = svn:mime-type=application/octet-stream
    *.sbs = svn:mime-type=application/octet-stream
    *.cls = svn:mime-type=application/octet-stream
    *.omd = svn:mime-type=application/octet-stream
    *.std = svn:mime-type=application/octet-stream
    *.ucd = svn:mime-type=application/octet-stream
    *.mcs = svn:mime-type=application/octet-stream
    *.ctd = svn:mime-type=application/octet-stream
    *.dpd = svn:mime-type=application/octet-stream
    *.pld = svn:mime-type=application/octet-stream
    *.fil = svn:mime-type=application/octet-stream
    *.fol = svn:mime-type=application/octet-stream

Results

You will always have to do merging manually. Use IBM Rational Rhapsody DiffMerge to merge Rational Rhapsody units manually.

For more information about the automatic property setting and the svn:mime-type property, see the Subversion product documentation.


Feedback