Script to load AutoMap with documents from a Mercurial repository

Specify the Mercurial URL to retrieve documents/files from with <HG_URL>.

The Mercurial location contents will be copied to the AutoMap job file directory. Then the "dir" command is used to build a list of filenames with the proper filename extension (*.ditamap), each of which will be included in the AutoMap publication.

A subdirectory called "docs" will be created that contains all the files (including subdirectories) from the Mercurial repository at <HG_URL>. All documents with the specified file extension will be included in the AutoMap publication. In this case filenames with a ".ditamap" extension are published.

rmdir /S /Q docs
hg clone "<HG_URL>" docs
dir docs\*.ditamap /B /S > "${FileListPath}"

Script steps explained:

  1. The above script removes any previously existing "docs" subdirectory inside the directory that contains the AutoMap job file.

  2. All files located in the Git repository located at: <HG_URL> are copied to the "docs" subdirectory.

  3. Finally the "dir" command is used to create a list of all the files located in the "docs" subdirectory that have the ".ditamap" extension.

Example Mercurial URLs:

HelpCenter/Tips/VersionControl/AutoMapDocumentCheckoutScripts/Mercurial (last edited 2016-10-06 15:54:38 by TonyMcDow)