Use canonicalsv to diff repository content - BloomReach Experience - Open Source CMS

Use canonicalsv to diff repository content

Introduction

The command line tool canonicalsv, included in Hippo CMS, can create a canonical (textual) representation of repository content exported as XML files. The canonical representation can be compared using regular diff tools.

A Hippo Enterprise Subscription provides access to more advanced tools for comparing and updating repository content.

The canonicalcv tool can be used to visualize the diff between two separate Hippo environments, for instance between the acceptance and production environments. It is also possible to create a diff between the current configuration and the bootstrap configuration of a single environment using the console diff and patch tool.

Installation

  1. Download the tool from https://code.onehippo.org/cms-community/hippo-cms/tree/release/3.2/tools/upgrade or check out the latest tag of Hippo CMS from the public Hippo source code repository, 

    git clone -b release/3.2 https://code.onehippo.org/cms-community/hippo-cms.git
  2. Change the current directory to the tools/upgrade subdirectory in the project:

    cd hippo-cms/tools/upgrade
  3. Build the module using Maven:

    mvn install
  4. You can now run canonicalsv as follows:

    sh target/canonicalsv/bin/canonicalsv <input.xml> > <output file>

Usage

You can compare repository content of two Hippo CMS systems following the steps below:

For each of the Hippo CMS systems between which you want to compare the repository content:

  1. Log in the the Console

    1. Export the node you want to compare, e.g. /hippo:namespaces/projectname

    2. Save the export as XML on your file system

    3. Run canonicalsv on each exported XML file, e.g.

      sh target/canonicalsv/bin/canonicalsv projectname.xml > projectname.txt
  2. Compare the corresponding files using your favourite diff tool.

 

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?