docs: protected void buildRevisionHistory(final BuildData buildData, final Map<String, String> overrides) throws BuildProcessingException {
          final ContentSpec contentSpec = buildData.getContentSpec();
  
          // Replace the basic injection data inside the revision history
          final String revisionHistoryXml = stringConstantProvider.getStringConstant(
                  buildData.getServerEntities().getRevisionHistoryStringConstantId()).getValue();
  
          // DocBook 5 shouldn't have the <revhistory> wrapped in a <simpara>
          final String fixedRevisionHistoryXml;
          if (buildData.getDocBookVersion() == DocBookVersion.DOCBOOK_50) {
              fixedRevisionHistoryXml = revisionHistoryXml.replaceAll(BuilderConstants.ESCAPED_TITLE_REGEX,
                      buildData.getEscapedBookTitle()).replace("<simpara>", "").replace("</simpara>", "");
          } else {
              fixedRevisionHistoryXml = revisionHistoryXml.replaceAll(BuilderConstants.ESCAPED_TITLE_REGEX, buildData.getEscapedBookTitle());
          }
  
          // Setup Revision_History.xml
          if (overrides.containsKey(CSConstants.REVISION_HISTORY_OVERRIDE) && buildData.getOverrideFiles().containsKey(
                  CSConstants.REVISION_HISTORY_OVERRIDE)) {
              byte[] revHistory = buildData.getOverrideFiles().get(CSConstants.REVISION_HISTORY_OVERRIDE);
              if (buildData.getBuildOptions().getRevisionMessages() != null && !buildData.getBuildOptions().getRevisionMessages().isEmpty()) {
                  try {
                      // Parse the Revision History and add the new entry/entries
                      final ByteArrayInputStream bais = new ByteArrayInputStream(revHistory);
                      final BufferedReader reader = new BufferedReader(new InputStreamReader(bais));
                      final StringBuilder buffer = new StringBuilder();
                      String line = "";
                      while ((line = reader.readLine()) != null) {
                          buffer.append(line + "\n");
                      }
  
                      if (buildData.getBuildOptions().getRevisionMessages() != null && !buildData.getBuildOptions().getRevisionMessages()
                              .isEmpty()) {
                          // Add a revision message to the Revision_History.xml
                          final String revHistoryOverride = buffer.toString();
                          final String docType = XMLUtilities.findDocumentType(revHistoryOverride);
                          if (docType != null) {
                              buildRevisionHistoryFromTemplate(buildData, revHistoryOverride.replace(docType, ""));
                          } else {
                              buildRevisionHistoryFromTemplate(buildData, revHistoryOverride);
                          }
                      } else {
                          addToZip(buildData.getBookLocaleFolder() + "Revision_History.xml", buffer.toString(), buildData);
                      }
                  } catch (Exception e) {
                      log.error(e.getMessage());
                      buildRevisionHistoryFromTemplate(buildData, fixedRevisionHistoryXml);
                  }
              } else {
                  // Add the revision history directly to the book
                  buildData.getOutputFiles().put(buildData.getBookLocaleFolder() + REVISION_HISTORY_FILE_NAME, revHistory);
              }
          } else if (contentSpec.getRevisionHistory() != null) {
              final TopicErrorData errorData = buildData.getErrorDatabase().getErrorData(contentSpec.getRevisionHistory().getTopic());
              final String revisionHistoryXML = DocBookBuildUtilities.convertDocumentToDocBookFormattedString(buildData.getDocBookVersion(),
                      contentSpec.getRevisionHistory().getXMLDocument(), "appendix", buildData.getEntityFileName(), getXMLFormatProperties());
              if (buildData.getBuildOptions().getRevisionMessages() != null && !buildData.getBuildOptions().getRevisionMessages().isEmpty()) {
                  buildRevisionHistoryFromTemplate(buildData, revisionHistoryXML);
              } else if (errorData != null && errorData.hasFatalErrors()) {
                  buildRevisionHistoryFromTemplate(buildData, revisionHistoryXML);
              } else {
                  // Add the revision history directly to the book
                  addToZip(buildData.getBookLocaleFolder() + REVISION_HISTORY_FILE_NAME, revisionHistoryXML, buildData);
              }
          } else {
              buildRevisionHistoryFromTemplate(buildData, fixedRevisionHistoryXml);
          }
      }