Merging Branches

Branches are multiple versions of content that are similar to copies, except that a branch can be merged back into its original source. For example, let's say you have a topic about "Temperature Sensors" and you branch it into two different topics. You now have the original "Temperature Sensors" topic and a branched version of it. These branches are completely separate, and you now have the choice to:

  • Let the multiple branches exist concurrently in Paligo as separate, but related, publications or topics

  • Merge the branches into a single topic (a topic that is the result of a merge is called a "single branch")

  • Merge parts of the branches. The branches will still exist concurrently as separate publications or topics, but some of their content will be merged so that it is identical in all versions. You can choose which parts you want to merge and which parts you want to remain separate.

The process for managing merges is slightly different depending on whether you want to Merge Topics or Merge Publications.

To merge a topic in one branch with a topic in another branch:

  1. Make sure that the topics in the branches are checked in and are in the Work in Progress state.

    You can find out if a topic is checked in or checked out by looking at the topic's icon in the Content Manager. If there is a green check mark, the topic is checked out. If there is no check mark, the topic is checked in.

    To see if a topic is in the Work in Progress state, select the Documents link in the Content Manager, and then browse to your topic in the document list. The status is shown in the list.

    documents-link.jpg

    Select the Documents link to display a list of documents and publications.

    merge-document-topics.jpg

    The status is shown next to the topic in the list.

    If the branched topic is not in the Work in Progress state, check with other writers, reviewers, and contributors before you change the state. You can change the state by selecting the state in the list.

    Tip

    You can also view the state by selecting the topic's option button ( ... ) and then selecting Edit > Open Structure. The status is shown at the top of the Metadata section, but you cannot change the status from here.

  2. In the Content Manager, select the option button ( ... ) for either of the branched topics you want to merge. Then select Branching > Merge Branch.

    merge-branch-topics.jpg

    Paligo displays the Merge document dialog.

  3. Select the merge target topic. This is the topic that Paligo will merge with the branched topic you selected in step ???. This can either be a Main branch topic or any other topic created from the same branch.

    merge-document-topic.jpg
  4. Select Next and Paligo provides you with a preview of the changes. They are shown as the source XML so that you can see the changes of each text fragment. The target branch is on the left, the source branch is on the right:

    merge-topic-show-changes.jpg

    Content highlighted in red is content that exists in the target, but will be deleted from the source. In the source, this content is grayed out.

    Content highlighted in green is content that will be added.

    Note

    When you are editing a branch, you can move existing content into a new section element so that it is in a subsection. If you then do a merge, Paligo will recognize the moved content as deleted content in its original position, and new content in its new position (in the subsection).

  5. Choose which merges you want to include or exclude.

    To include a merge, leave it highlighted.

    To exclude a merge, select it to toggle the merge off. For example, let's say you have a text fragment that is highlighted in green as it is going to be added to the source topic. You can choose to go ahead with the merge by doing nothing or you can select the highlighted text fragment to "undo" it, so that it is not included in the merge.

  6. Select Preview to see what the merged content will look like.

    merge-topic-preview.jpg
  7. When you are happy with the merge preview, close it. Then use the Delete branch when done box to choose whether you want to keep or remove the source branch after the merge. If you check the box, the source branch will be deleted and the target branch will be updated so that it contains the content shown in the preview. If you clear the box, the target branch will be updated, but the source branch will remain in Paligo as a separate branch.

  8. Select Merge to complete the merge process.

To merge a publication in one branch with a publication in another branch:

  1. Make sure that the publications in the branches are checked in and are in the Work in Progress state.

    You can find out if a publication is checked in or checked out by looking at the publication's icon in the Content Manager. If there is a green check mark, the publication is checked out. If there is no check mark, the publication is checked in.

    To see if a publication is in the Work in Progress state, select the Documents link in the Content Manager, and then browse to your publication in the document list. The status is shown in the list.

    documents-link.jpg

    Select the Documents link to display a list of documents and publications.

    work-in-progress-status.jpg

    The status is shown next to the publication in the list.

    If the branched publications are not in the Work in Progress state, check with other writers, reviewers, and contributors before you change the state. You can change the state by selecting the state in the list.

  2. In the Content Manager, select the option button ( ... ) for either of the branched publications. Then select Branching > Merge Branch.

    merge-branch-option.jpg

    Paligo displays the Merge document dialog.

  3. Select the merge target. This is the branch that Paligo will merge with the branch you selected in step ???. This can either be a main branch publication or any other publication created from the same branch.

    MergeBranch.png
  4. Select Next and Paligo provides you with a preview of the changes. The target is on the left, the source in the middle, and a preview of the merge results on the right:

    merge-structure-dialog.jpg

    Note

    At this stage, the preview matches the merge target and no merging is included. When you choose which content you want to merge (see step ???), the preview will update.

  5. The parts of the publications that are different are highlighted. Select the version that you want to keep, and it will be added to the preview on the right.

    merge-structure-dialog-topics-added.jpg
  6. When you are happy with the merge preview, use the Delete branch when done box to choose whether you want to keep or remove the source branch after the merge. If you check the box, the source branch will be deleted and the target branch will be updated so that it contains the content shown in the preview. If you clear the box, the target branch will be updated, but the source branch will remain in Paligo as a separate branch.

  7. Select Merge to complete the merge process.