Integration with Mercurial

 Table of Contents

1. Introduction

This sample is provided to show DITA Merge integration with Mercurial (hg) for merge, graft and update operations.

The sample currently supports the command-line client usage on a Unix system.

Please see the README.md on Bitbucket for detailed configuration steps.

2. Usage notes and tips

The DITA Merge results have deltaxml namespaced attributes at the root node which should be removed manually while resolving the conflicts.

DITA Merge can be used with DeltaXML-DITA-Merge.args=$base $local $other $output ResultType=CONFLICTING_CHANGES WordByWord=true.

The parameter 'ResultType' works well with one of the following settings on the command line:

  • SIMPLIFIED_DELTAV2
  • SIMPLIFIED_RULE_PROCESSED_DELTAV2
  • CONFLICTING_CHANGES
  • THEIR_CHANGES
  • ALL_CHANGES

2.1. SIMPLIFIED_DELTAV2 and SIMPLIFIED_RULE_PROCESSED_DELTAV2

The simplified result types show three way merges and are designed to be easier to understand.

These results have deltaxml markup and attributes only for the changes. It is therefore easier to edit and resolve conflicts.

2.2. CONFLICTING_CHANGESTHEIR_CHANGES and ALL_CHANGES

The result types: CONFLICTING_CHANGESTHEIR_CHANGES and ALL_CHANGES are all three to two merge results. For more details, please visit Three to Two Way Merge Use Cases Guide.

These results have deltaxml markup only at the change but deltaxml:deltaV2 attributes appear throughout the xml hierarchy. Users should remove these attributes manually. Alternatively, try The Simplified DITA Merge Format which is easier for manual change resolution.

Oxygen "track changes" instructions can also be applied to these output formats which will then allow the user to accept and reject changes interactively within Oxygen. The ResultFormat command-line option can be used to select this output format (OXYGEN_TRACK_CHANGES).

#content .code